Class: Aws::Omics::Waiters::TaskRunning

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-omics/waiters.rb

Overview

Wait until a task is running.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ TaskRunning

Returns a new instance of TaskRunning.

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 20
  • :delay (Integer) — default: 30
  • :before_attempt (Proc)
  • :before_wait (Proc)


879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
# File 'lib/aws-sdk-omics/waiters.rb', line 879

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 20,
    delay: 30,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_run_task,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "success",
          "expected" => "RUNNING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "PENDING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "STARTING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "FAILED"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "CANCELLED"
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



929
930
931
# File 'lib/aws-sdk-omics/waiters.rb', line 929

def waiter
  @waiter
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetRunTaskResponse

Returns a response object which responds to the following methods:

Options Hash (params):

  • :id (required, String)

    The workflow run ID.

  • :task_id (required, String)

    The task’s ID.

Returns:



924
925
926
# File 'lib/aws-sdk-omics/waiters.rb', line 924

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end