Difference between `bin/delayed_job` and `rake jobs:work`? #659

Closed
dideler opened this Issue May 12, 2014 · 5 comments

Comments

Projects
None yet
5 participants

dideler commented May 12, 2014

The README says both "will start working off jobs".

The README seems to present delayed_job script as the preferred method since it's introduced first.

The Heroku DJ guide uses rake jobs:work.

Ryan Bates has a RailsCast where he says to use the delayed_job script instead of rake jobs:work in production.

So far we've been starting Delayed Job by running rake jobs:work but in production we should use the delayed_job script provided in the script folder.

Any tips for when to use which?

rdetert commented May 19, 2014

bin/delayed_job starts a daemon to listen for incoming requests while rake jobs:work starts processing in the foreground and is good for debugging. In production use bin/delayed_job

dideler commented May 19, 2014

Thansk @rdetert!

dideler closed this May 19, 2014

wired00 commented Apr 29, 2016

what about when running via supervisord which requires foreground processes?

Owner

albus522 commented Apr 29, 2016

rake jobs:work is no less production worthy than bin/delayed_job. Use what works for your use case.

javanux commented Jan 8, 2017

I want to run delayed_job as a foreground process since I as using runsv to supervise the workers. But the --pid-dir option doesn't work while running it in foreground i.e pid-file is not created in approot/shared//tmp/pids which is preventing me to send kill signal to that process while deploying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment