lib/qe/delayed_job.rb in qe-0.2.0 vs lib/qe/delayed_job.rb in qe-0.2.1

- old
+ new

@@ -8,10 +8,17 @@ Qe::Worker.perform(worker_name, options) end end def self.enqueue(worker, options = {}) - Delayed::Job.enqueue Worker.new(worker.name, options), :queue => worker.queue + Delayed::Job.enqueue Worker.new(worker.name, options), + :queue => worker.queue + end + + def self.schedule(worker, run_at, options = {}) + Delayed::Job.enqueue Worker.new(worker.name, options), + :queue => worker.queue, + :run_at => run_at end end self.adapter = DelayedJob end