diff options
Diffstat (limited to 'activejob/lib/active_job/queue_adapters/backburner_adapter.rb')
-rw-r--r-- | activejob/lib/active_job/queue_adapters/backburner_adapter.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb index 8ebee36e45..e1b00f1de7 100644 --- a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb @@ -4,20 +4,20 @@ module ActiveJob module QueueAdapters class BackburnerAdapter class << self - def enqueue(job, *args) - Backburner::Worker.enqueue JobWrapper, [ job.name, *args ], queue: job.queue_name + def enqueue(job) + Backburner::Worker.enqueue JobWrapper, [ job.serialize ], queue: job.queue_name end - def enqueue_at(job, timestamp, *args) + def enqueue_at(job, timestamp) delay = timestamp - Time.current.to_f - Backburner::Worker.enqueue JobWrapper, [ job.name, *args ], queue: job.queue_name, delay: delay + Backburner::Worker.enqueue JobWrapper, [ job.serialize ], queue: job.queue_name, delay: delay end end class JobWrapper class << self - def perform(job_name, *args) - job_name.constantize.new.execute(*args) + def perform(job_data) + Base.execute job_data end end end |