Skip to content

Commit c140db4

Browse files
committed
monkeypatch enqueue_after_transaction_commit? for ShoryukenAdapter
1 parent bac8f84 commit c140db4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

config/initializers/monkey_patches.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,13 @@ def self.migration_table_name
102102
end
103103
end
104104
end
105+
# Temporary fix until https://github.com/ruby-shoryuken/shoryuken/pull/777 or
106+
# https://github.com/rails/rails/pull/53336 is merged
107+
if Rails.env.production?
108+
ShoryukenAdapter.class_eval do
109+
def enqueue_after_transaction_commit?
110+
true
111+
end
112+
end
113+
end
105114
end

0 commit comments

Comments
 (0)