public
Description: Database backed asynchronous priority queue -- Extracted from Shopify
Home | Edit | New

Running Delayed::Worker as a daemon

Check out the Collective Idea fork of delayed_job for a script to manage the daemon.

An easy way to take the effort out of managing your background worker process is to write a simple wrapper script using the daemons gem. This allows you to do things such as script/worker (start|stop|run|restart) and throws PID management into the mix as well, making it easy to deploy and restart using capistrano.

An example script can be found in the gist below. Simply paste it into a new file in your application’s script folder and give it executable permissions.

Last edited by brandon, Sun Sep 06 08:15:20 -0700 2009
Home | Edit | New
Versions: