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.



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

def poll_interval
  @poll_interval
end

Instance Method Details

#check_delayed_plansObject



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

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



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

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

#startObject



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

def start
  check_delayed_plans
end