class Afterparty::JobContainer
Attributes
execute_at[RW]
job[RW]
job_id[RW]
queue_name[RW]
raw[RW]
Public Class Methods
new(_raw, timestamp)
click to toggle source
intialized from redis's WITHSCORES function
# File lib/afterparty/job_container.rb, line 9 def initialize _raw, timestamp @execute_at = Time.at(timestamp) begin @job = Afterparty.load(_raw) @job_id = job.afterparty_job_id if @job.respond_to? :afterparty_job_id @queue_name = job.afterparty_queue if @job.respond_to? :afterparty_queue rescue Exception => e @job = nil end @raw = _raw self end
Public Instance Methods
job_class()
click to toggle source
# File lib/afterparty/job_container.rb, line 22 def job_class if @job @job.class else nil end end