Object
Tracking at/in/every jobs.
In order of trigger time.
Mapping :at|:in|:every to their respective job classes.
Adds this job to the map.
# File lib/rufus/sc/jobqueues.rb, line 66 def << (job) @mutex.synchronize do delete(job.job_id) @jobs << job @jobs.sort! { |j0, j1| j0.at <=> j1.at } end end
Returns a list of jobs of the given type (:at|:in|:every)
# File lib/rufus/sc/jobqueues.rb, line 91 def select (type) type = JOB_TYPES[type] @jobs.select { |j| j.is_a?(type) } end
Returns a mapping job_id => job
# File lib/rufus/sc/jobqueues.rb, line 84 def to_h @jobs.inject({}) { |h, j| h[j.job_id] = j; h } end
Generated with the Darkfish Rdoc Generator 2.