If I have an app on Heroku that consists of one worker and one or no web dynos, will it run? I'm unsure if the absent or idling web dynos will cause the worker dyno not to run.
A separate app process (known on Heroku as a worker process) notices that a task was added to the job queue. It takes the task off of the queue and begins performing it. When the worker process completes the task, it persists the outcome of the task.
If you wish to stop a running one-off dyno, use heroku ps:stop with its name. A one-off dyno will not stop if you issue heroku ps:restart on your application.
free, hobby and standard-1x have 512 MB. standard-2x has 1024 MB. performance-m has 2.5 GB.
In addition to the web dyno sleeping, the worker dyno (if present) will also sleep. Free web dynos do not consume free dyno hours while sleeping. If a sleeping web dyno receives web traffic, it will become active again after a short delay (assuming your account has free dyno hours available).
Heroku doesn't just run web
dynos, in fact, it makes no assumptions at all with regards to the processes you're running. There's absolutely nothing wrong with launching a single worker
process.
This is actually a common scenario for me to deploy single cron-like tasks to Heroku, I've written about it here http://blog.y3xz.com/blog/2012/11/16/deploying-periodical-tasks-on-heroku/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With