lib/belated/queue.rb in belated-0.5.5 vs lib/belated/queue.rb in belated-0.5.6

- old
+ new

@@ -4,10 +4,15 @@ require 'belated/logging' require 'belated/job_wrapper' require 'sorted_set' class Belated + # Job queues that Belated uses. + # queue is the jobs that are currenly + # waiting for a worker to start working on them. + # future_jobs is a SortedSet of jobs that are going + # to be added to queue at some point in the future. class Queue include Logging attr_accessor :future_jobs FILE_NAME = 'belated_dump' @@ -79,9 +84,9 @@ end private def proc_or_shutdown?(job) - job.job.instance_of?(Proc) || job.is_a?(Symbol) + job.is_a?(Symbol) || job.job.instance_of?(Proc) end end end