diff --git a/lib/que/job.rb b/lib/que/job.rb index 11242da0..237a3885 100644 --- a/lib/que/job.rb +++ b/lib/que/job.rb @@ -76,6 +76,8 @@ def run(*args) end def work(queue = '') + ::ActiveRecord::Base.clear_active_connections! + # Since we're taking session-level advisory locks, we have to hold the # same connection throughout the process of getting a job, working it, # deleting it, and removing the lock.