Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add a worker dyno to a Heroku project?

Tags:

heroku

How do you add a Worker dyno to a Heroku app?

Their help system includes some information: https://devcenter.heroku.com/articles/background-jobs-queueing

including the instruction to use the command line to scale your app:

$ heroku ps:scale web=1 worker=5

This returns the response that workers are not defined.

The UI also has a page for adjusting resources: Heroku Resources Page

But it does not include the option to add workers.

like image 202
D Maxwell Avatar asked Oct 29 '12 19:10

D Maxwell


1 Answers

You need to have a worker in your Procfile and then worker dyno settings will appear in UI.

Just add

worker: command_to_run_your_worker

to your Procfile and after that you will be able to scale workers.

like image 132
Sergey Kirillov Avatar answered Sep 28 '22 02:09

Sergey Kirillov