We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f24adb2 commit ea71a07Copy full SHA for ea71a07
lib/que/active_record/connection.rb
@@ -63,9 +63,9 @@ def clear_active_connections_if_needed!(job)
63
# see https://github.com/que-rb/que/pull/393
64
return if job.class.resolve_que_setting(:run_synchronously)
65
66
- # don't clear connections in nested jobs,
67
- # i.e. clear only if this is the outermost instance of
68
- # Que::ActiveRecord::Connection::JobMiddleware
+ # don't clear connections in nested jobs executed synchronously
+ # i.e. while we're still inside of the rails executor
+ # see https://github.com/que-rb/que/pull/412#issuecomment-2194412783
69
return if Que::ActiveRecord.active_rails_executor?
70
71
::ActiveRecord::Base.clear_active_connections!
0 commit comments