I have some miniapp that use delayed_job. On my localhost everything works fine, but when I deploy my app to Heroku and click on the link that should be executed by delayed_job, so nothing happen, the “task” is just saved into the table delayed_job.
In this article on heroku blog is written, that the task from delayed_job table is executed, when is run this command rake jobs:work.
But how can I run this command? Where should be the command placed? In the code, or from terminal console?
If you are running the Cedar stack, run the following from the terminal console:
If you are running the older stacks (Bamboo, Aspen, etc.):
see: https://devcenter.heroku.com/articles/rake
According to the
delayed_jobdocumentation, you can also start a worker programmatically: