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

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

Overview

Wait until a task is running.

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 'gems/aws-sdk-omics/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 Method Details

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

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :id (required, String)

    The workflow run ID.

  • :task_id (required, String)

    The task's ID.

Returns:



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

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