Skip to content

Commit ea71a07

Browse files
committed
Improve comment
1 parent f24adb2 commit ea71a07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/que/active_record/connection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def clear_active_connections_if_needed!(job)
6363
# see https://github.com/que-rb/que/pull/393
6464
return if job.class.resolve_que_setting(:run_synchronously)
6565

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
66+
# don't clear connections in nested jobs executed synchronously
67+
# i.e. while we're still inside of the rails executor
68+
# see https://github.com/que-rb/que/pull/412#issuecomment-2194412783
6969
return if Que::ActiveRecord.active_rails_executor?
7070

7171
::ActiveRecord::Base.clear_active_connections!

0 commit comments

Comments
 (0)