Class: Aws::Omics::Waiters::TaskCompleted

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

Overview

Wait until a task is completed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ TaskCompleted

Returns a new instance of TaskCompleted.

Parameters:

  • options (Hash)

Options Hash (options):

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


810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/aws-sdk-omics/waiters.rb', line 810

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" => "COMPLETED"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "PENDING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "STARTING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "RUNNING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "STOPPING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "FAILED"
        }
      ]
    )
  }.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.



866
867
868
# File 'lib/aws-sdk-omics/waiters.rb', line 866

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:



861
862
863
# File 'lib/aws-sdk-omics/waiters.rb', line 861

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