Class: Moon::Scheduler::Jobs::Process

Inherits:
Base show all
Defined in:
lib/moon/packages/scheduler/jobs/process.rb

Overview

Processes are forever running jobs, unlike intervals which execute after duration and simply restart, processes will call their callback everytime they update. To stop a process, simply #kill it.

Instance Attribute Summary

Attributes inherited from Base

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

Instance Method Summary collapse

Methods inherited from Base

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

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::Base

Instance Method Details

#update_job(delta) ⇒ Object

Parameters:


12
13
14
# File 'lib/moon/packages/scheduler/jobs/process.rb', line 12

def update_job(delta)
  trigger_callback(delta, self)
end