Table of Contents
Delayed Job, also known as DJ, is a queueing system for Rails. Please reference the Delayed Job documentation on Dev Center to learn how to configure Delayed Job, enqueue jobs, and build workers.
These instructions apply to the Bamboo stack only.
Once your app uses DJ, you can start workers locally, or on a traditional host, using
rake jobs:work. On Heroku’s Bamboo stack, start your worker process via the
$ cd myapp $ heroku scale workers=1 myapp is now running 1 worker
You can verify that the DJ process started without error by inspecting the logs:
$ heroku logs 2011-05-31T15:58:43+00:00 app[dj.1]: (in /app) 2011-05-31T15:58:43+00:00 app[dj.1]: *** Starting job worker host:runtime.51985 pid:2476
To shut down all worker processes, set workers to zero:
heroku scale workers=0
Heroku will run and manage the number of worker processes you specify, and you’ll be billed to a prorated second, exactly like dynos. You can increase or decrease your workers as needed:
$ heroku scale workers=3 myapp is now running 3 workers $ heroku scale workers=2 myapp is now running 2 workers