Class: Moon::Scheduler::Jobs::TimedProcess

Inherits:
TimeBase show all
Defined in:
lib/moon/packages/scheduler/jobs/timed_process.rb

Overview

TimedProcess jobs are similar to Processes, they will run over their provided duration.

Direct Known Subclasses

Transition

Defined Under Namespace

Classes: DoneEvent

Instance Attribute Summary

Attributes inherited from TimeBase

#duration, #time

Attributes inherited from Base

#active, #id, #key, #killed, #uptime

Instance Method Summary collapse

Methods inherited from TimeBase

#done?, #finish, #initialize, #rate, #restart, #stop, #timeout?, #update_job

Methods inherited from Base

#done?, #initialize, #kill, #killed?, #trigger_callback, #update, #update_job

Methods included from Activatable

#activate, #active?, #deactivate

Methods included from Eventable

#allow_event?, #clear_events, #each_listener, #each_typed_listener, filter_from_options, #has_events?, #initialize_eventable, #off, #on, #ppd_ev, #trigger, #typing

Constructor Details

This class inherits a constructor from Moon::Scheduler::Jobs::TimeBase

Instance Method Details

#on_timeoutObject


15
16
17
# File 'lib/moon/packages/scheduler/jobs/timed_process.rb', line 15

def on_timeout
  trigger DoneEvent.new
end

#update_job_step(delta) ⇒ Object

Parameters:


20
21
22
# File 'lib/moon/packages/scheduler/jobs/timed_process.rb', line 20

def update_job_step(delta)
  trigger_callback delta, self
end