Class: Swa::CLI::AthenaCommand::QueryCompletionWaiter
- Inherits:
-
Object
- Object
- Swa::CLI::AthenaCommand::QueryCompletionWaiter
- Defined in:
- lib/swa/cli/athena_command.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ QueryCompletionWaiter
constructor
A new instance of QueryCompletionWaiter.
- #wait(params = {}) ⇒ Object
Constructor Details
#initialize(options) ⇒ QueryCompletionWaiter
Returns a new instance of QueryCompletionWaiter.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/swa/cli/athena_command.rb', line 174 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 30, delay: 5, poller: Aws::Waiters::Poller.new( operation_name: :get_query_execution, acceptors: [ { "matcher" => "path", "argument" => "query_execution.status.state", "expected" => "SUCCEEDED", "state" => "success", }, { "matcher" => "path", "argument" => "query_execution.status.state", "expected" => "FAILED", "state" => "failure", }, { "matcher" => "path", "argument" => "query_execution.status.state", "expected" => "CANCELLED", "state" => "error", } ] ) }.merge()) end |
Instance Method Details
#wait(params = {}) ⇒ Object
205 206 207 |
# File 'lib/swa/cli/athena_command.rb', line 205 def wait(params = {}) @waiter.wait(client: @client, params: params) end |