No release in over 3 years
Low commit activity in last 3 years
In conjunction with capistrano-maintenance, stop delayed jobs during maintenance
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

Runtime

>= 3.0
 Project Readme

Delayed Job Maintenance

Extends capistrano-maitenance to stop delayed job while the maintenance page is displayed.

Usage

After capistrano-maintenence is installed and configured, your application's web interface will be disabled when the maintenance page is written to the server. To also disable backend processing in delayed job, you need to configure capistrano-maintenance to also write to the delayed-job servers.

In your deployment configuration, add the queue server, or whichever role you use for capistrano deployments to your delayed job servers:

set :maintenance_roles, -> { roles([:web, :queue]) }

By default, capistrano-maintnance will write the maintenance template to "#{shared_path}/public/system". However, shared_path is a capistrano variable and is not available in delayed_job. If this is different than Rails.root.join("public", "system") or you are using a different maintenance file, you will need to configure the maintenance file:

Add this as an initializer:

DelayedJobMaintenance.configure do |config|
  config.maintenance_file = Rails.root.join("public", "system", "maintenance.html")
end

Installation

Add this line to your application's Gemfile:

gem 'delayed_job_maintenance'

And then execute:

$ bundle

Or install it yourself as:

$ gem install delayed_job_maintenance

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/GoodMeasuresLLC/delayed_job_maintenance. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.