DEV: Try fixing flaky spec related to Scheduler::Defer
Checking if a connection is available is probably not enough, when the connection is available, we should still verify it’s not stale.
This commit is contained in:
parent
8f8d88afac
commit
88f1b3b195
|
@ -136,7 +136,7 @@ module Scheduler
|
|||
rescue => ex
|
||||
Discourse.handle_job_exception(ex, message: "Processing deferred code queue")
|
||||
ensure
|
||||
if ActiveRecord::Base.connection
|
||||
if ActiveRecord::Base.connection&.verify!
|
||||
ActiveRecord::Base.connection_handler.clear_active_connections!
|
||||
end
|
||||
if start
|
||||
|
|
Loading…
Reference in New Issue