Heroku dyno/worker crashes at start Heroku dyno/worker crashes at start heroku heroku

Heroku dyno/worker crashes at start


Workers are used for background processing, for example, sending e-mails, fetching data from some web service, in general it's for any task that takes long and you don't want your user to wait for it to see the page.This is a think that should be used for performance, because if you are using web dynos for sending like 10 e-mails, that's time that they aren't responding to user request, so you can't handle so many users.

Taks must be queued and workers should check that queue to get that job done!

So your worker crashs because you don't have any job defined, so he can waits for queues on that job. Check this gem for information on how to set a job and queue tasks.

https://github.com/defunkt/resque

Another thing that workers can be used for it's to schedule some task, like cron jobs. Here is a gem for help on that.

https://github.com/javan/whenever

I highly recommend you to watch this too videos on RailsCasts

http://railscasts.com/episodes/171-delayed-job

http://railscasts.com/episodes/271-resque