File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -26,14 +26,12 @@ class Railtie < Rails::Railtie # :nodoc:
26
26
end
27
27
28
28
initializer "active_job.enqueue_after_transaction_commit" do |app |
29
- if config . active_job . key? ( :enqueue_after_transaction_commit )
30
- enqueue_after_transaction_commit = config . active_job . delete ( :enqueue_after_transaction_commit )
29
+ ActiveSupport . on_load ( :active_record ) do
30
+ ActiveSupport . on_load ( :active_job ) do
31
+ include EnqueueAfterTransactionCommit
31
32
32
- ActiveSupport . on_load ( :active_record ) do
33
- ActiveSupport . on_load ( :active_job ) do
34
- include EnqueueAfterTransactionCommit
35
-
36
- ActiveJob ::Base . enqueue_after_transaction_commit = enqueue_after_transaction_commit
33
+ if app . config . active_job . key? ( :enqueue_after_transaction_commit )
34
+ ActiveJob ::Base . enqueue_after_transaction_commit = app . config . active_job . delete ( :enqueue_after_transaction_commit )
37
35
end
38
36
end
39
37
end
You can’t perform that action at this time.
0 commit comments