diff options
Diffstat (limited to 'lib/active_job')
-rw-r--r-- | lib/active_job/queue_adapters/sneakers_adapter.rb | 5 | ||||
-rw-r--r-- | lib/active_job/queue_adapters/sucker_punch_adapter.rb | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/active_job/queue_adapters/sneakers_adapter.rb b/lib/active_job/queue_adapters/sneakers_adapter.rb index be400dc477..c6dbfa75bf 100644 --- a/lib/active_job/queue_adapters/sneakers_adapter.rb +++ b/lib/active_job/queue_adapters/sneakers_adapter.rb @@ -14,9 +14,8 @@ module ActiveJob self.from_queue("queue", {}) - def work(*args) - job_name = args.shift - job_name.new.perform *Parameters.deserialize(args) + def work(job, *args) + job.new.perform *Parameters.deserialize(args) end end end diff --git a/lib/active_job/queue_adapters/sucker_punch_adapter.rb b/lib/active_job/queue_adapters/sucker_punch_adapter.rb index 182b5ce018..6ca6726456 100644 --- a/lib/active_job/queue_adapters/sucker_punch_adapter.rb +++ b/lib/active_job/queue_adapters/sucker_punch_adapter.rb @@ -12,8 +12,8 @@ module ActiveJob class JobWrapper include SuckerPunch::Job - def perform(job_name, *args) - job_name.new.perform *Parameters.deserialize(args) + def perform(job, *args) + job.new.perform *Parameters.deserialize(args) end end end |