Class: Dynflow::DelayedExecutors::PollingCore

Inherits:
AbstractCore
  • Object
show all
Defined in:
lib/dynflow/delayed_executors/polling.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractCore

#logger, #world

Instance Method Summary collapse

Methods inherited from AbstractCore

#initialize

Methods inherited from Actor

#behaviour_definition, #finish_termination, #start_termination, #terminating?

Methods included from MethodicActor

#on_message

Methods included from Actor::LogWithFullBacktrace

#log

Constructor Details

This class inherits a constructor from Dynflow::DelayedExecutors::AbstractCore

Instance Attribute Details

#poll_intervalObject (readonly)

Returns the value of attribute poll_interval.



12
13
14
# File 'lib/dynflow/delayed_executors/polling.rb', line 12

def poll_interval
  @poll_interval
end

Instance Method Details

#check_delayed_plansObject



23
24
25
26
27
28
29
# File 'lib/dynflow/delayed_executors/polling.rb', line 23

def check_delayed_plans
  check_time = time
  plans = delayed_execution_plans(check_time)
  process plans, check_time

  world.clock.ping(self, poll_interval, :check_delayed_plans)
end

#configure(options) ⇒ Object



14
15
16
17
# File 'lib/dynflow/delayed_executors/polling.rb', line 14

def configure(options)
  super(options)
  @poll_interval = options[:poll_interval]
end

#startObject



19
20
21
# File 'lib/dynflow/delayed_executors/polling.rb', line 19

def start
  check_delayed_plans
end