Class: OpenWFE::AtJob
Overview
An ‘at’ job.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#at ⇒ Object
The float representation (Time.to_f) of the time at which the job should be triggered.
Attributes inherited from Job
#block, #job_id, #params, #scheduler, #tags
Instance Method Summary collapse
-
#initialize(scheduler, at, at_id, params, &block) ⇒ AtJob
constructor
The constructor.
-
#schedule_info ⇒ Object
Returns the Time instance at which this job is scheduled.
-
#trigger ⇒ Object
Triggers the job (calls the block).
Methods inherited from Job
Constructor Details
#initialize(scheduler, at, at_id, params, &block) ⇒ AtJob
The constructor.
976 977 978 979 980 |
# File 'lib/openwfe/util/scheduler.rb', line 976 def initialize (scheduler, at, at_id, params, &block) super(scheduler, at_id, params, &block) @at = at end |
Instance Attribute Details
#at ⇒ Object
The float representation (Time.to_f) of the time at which the job should be triggered.
971 972 973 |
# File 'lib/openwfe/util/scheduler.rb', line 971 def at @at end |
Instance Method Details
#schedule_info ⇒ Object
Returns the Time instance at which this job is scheduled.
993 994 995 996 |
# File 'lib/openwfe/util/scheduler.rb', line 993 def schedule_info Time.at(@at) end |
#trigger ⇒ Object
Triggers the job (calls the block)
985 986 987 988 |
# File 'lib/openwfe/util/scheduler.rb', line 985 def trigger @block.call @job_id, @at end |