Repository is archived
No commit activity in last 3 years
No release in over 3 years
If you're using ActiveRecord with Resque, a new database connection will get opened for each worker process. When the worker completes, this connection is left open by default, which is pretty bad. This adapter closes the connection when the job has_rdoc finished executing.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 10.3
>= 0

Runtime

 Project Readme

ActiveJob::QueueAdapters::ResqueDisconnectAdapter

ActiveJob adapter for Resque which disconnects when the worker has finished.

By default the connection will be left open until the database times it out, which eats up database connections for no good reason.

require 'active_job/queue_adapters/resque_disconnect_adapter'

MyApp::Application.configure do
  config.active_job.queue_adapter = ActiveJob::QueueAdapters::ResqueDisconnectAdapter
end