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.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/swa/cli/athena_command.rb', line 160 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
191 192 193 |
# File 'lib/swa/cli/athena_command.rb', line 191 def wait(params = {}) @waiter.wait(client: @client, params: params) end |