Class: Rukawa::Builtins::Waiter

Inherits:
Base show all
Defined in:
lib/rukawa/builtins/waiter.rb

Direct Known Subclasses

GCSWaiter, LocalFileWaiter, S3Waiter, SleepWaiter

Instance Attribute Summary

Attributes inherited from Job

#finished_at, #in_comings, #out_goings, #started_at, #state, #variables

Attributes inherited from AbstractJob

#parent_job_net

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

[]

Methods inherited from Job

after_fail, after_run, around_run, before_run, #dataflow, #initialize, #jobs_as_from, #leaf?, #resource_count, #root?, set_dependency_type, set_resource_count, set_retryable, #set_state, #to_dot_def, wrapper_for, wrappers

Methods inherited from AbstractJob

add_skip_rule, description, #elapsed_time_from, #formatted_elapsed_time_from, #inspect, #name, set_description, #skip?

Constructor Details

This class inherits a constructor from Rukawa::Job

Class Method Details

.handle_parameters(timeout: nil, poll_interval: nil, **rest) ⇒ Object



13
14
15
16
# File 'lib/rukawa/builtins/waiter.rb', line 13

def handle_parameters(timeout: nil, poll_interval: nil, **rest)
  self.timeout = timeout if timeout
  self.poll_interval = poll_interval if poll_interval
end

Instance Method Details

#runObject



19
20
21
22
23
24
25
# File 'lib/rukawa/builtins/waiter.rb', line 19

def run
  Timeout.timeout(timeout) do
    wait_until do
      fetch_condition
    end
  end
end