Start and Stop Delayed::Workers With Daemonizer

Delayed::Job comes out of the box with a startup script that relies on the daemons gem. to start and stop worker processes.  Problem is, we’ve never actually had it work. After browsing around our options we decided to give daemonizer a go.  The main advantage we saw to daemonizer is that you simply define a single “Daemonfile” in your project’s root (similar to a Gemfile or Rakefile) explaining how to set up each processes environment.

My Daemonfile looks like this:

The only minor problem we had was with daemonizer’s gem dependencies clashing with my apps.  We have submitted a patch to make sure that daemonizer uses bundle if the project has a Gemfile present.