Skip to content

Commit fd403d4

Browse files
committed
Lean on ActiveJob::Base to execute the job
This follows the other queue adapters in ActiveJob upstream, and Delayed::Job's queue adapter as well. Ensures the job deserialize is called within the executor block/execute callbacks along with perform. If the deserialize method is causing side effects like using ActiveSupport::CurrentAttributes they won't get cleared between deserialize and perform being invoked.
1 parent 4dd2694 commit fd403d4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/delayed/job_wrapper.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ def display_name
1313
end
1414

1515
def perform
16-
ActiveJob::Callbacks.run_callbacks(:execute) do
17-
job.perform_now
18-
end
16+
ActiveJob::Base.execute(job_data)
1917
end
2018

2119
def encode_with(coder)

0 commit comments

Comments
 (0)