diff --git a/lib/scheduler/defer.rb b/lib/scheduler/defer.rb index 9b0d97f8311..9758d95f287 100644 --- a/lib/scheduler/defer.rb +++ b/lib/scheduler/defer.rb @@ -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