Run Resque when loading / reloading passengers

My environment: Rails 3.2.x with RVM, Passenger, Apache on Linux (Ubuntu), I do not use Capistrano and at the moment I do not intend to do this.

I have included Resque in my Rails application and everything works fine when scque is manually started using

rake RAILS_ENV=production environment resque:work QUEUE='*'

The next step will be the automatic launch of Resque (reboot) when starting (rebooting) the Passenger.

How should I do it?

+5
source share
1 answer

How about using foreman for this problem?

Foreman is a profile-based tool for managing multiprocessor rails.

Simple entry can be seen at railscasts . An example might look like this:

web: bundle exec rails server
solr: bundle exec rake sunspot:solr:run
resque: rake RAILS_ENV=production environment resque:work QUEUE='*'
+2

All Articles