DEV: Verify DB connection before trying to clear active connections

This commit is contained in:
Loïc Guitaut 2024-11-27 18:00:21 +01:00 committed by Loïc Guitaut
parent f186e3e80b
commit fac6147039
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ module Scheduler
rescue => ex
Discourse.handle_job_exception(ex, message: "Processing deferred code queue")
ensure
ActiveRecord::Base.connection.verify!
ActiveRecord::Base.connection_handler.clear_active_connections!
if start
@stats_mutex.synchronize do