lib/belated/job_wrapper.rb in belated-0.5.7 vs lib/belated/job_wrapper.rb in belated-0.6.0

- old
+ new

@@ -11,18 +11,19 @@ # - job retries # - job retry delay class JobWrapper include Comparable include Logging - attr_accessor :retries, :max_retries, :id, :job, :at, :completed + attr_accessor :retries, :max_retries, :id, :job, :at, :completed, :proc_klass def initialize(job:, max_retries: 5, at: nil) self.retries = 0 self.max_retries = max_retries self.id = SecureRandom.uuid self.job = job self.at = at self.completed = false + self.proc_klass = job.instance_of?(Proc) end def <=>(other) at <=> other.at end