I have not been able to find any documentation on how to run worker tasks in the background for something like Resque. There is an article for installing Redis on the droplet: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis, and I have a Procfile using Foreman gem in which I have the background tasks, but I can’t figure how to run them on the droplet.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Thanks for pointing me in the right direction. There were still a few issues that I faced in implementing this properly, so I thought I’d help others trying to implement this in their app. I assume that resque has already been implemented in the app locally. I followed these steps for implementing resque on my app hosted on digital ocean:
Install Redis on the droplet using this helpful article : https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
Use foreman/upstart as suggested in the comment above to detail the tasks/servers that you want to run. The procfile is what will be used to run the processes. The following links are helpful for understanding: http://blog.daviddollar.org/2011/05/06/introducing-foreman.html http://railscasts.com/episodes/281-foreman
This is what my Procfile looks like :
This should get the workers going.
The Resque wiki provide a sample cap task to manage Resque processes.
It builds off this blog post on managing and monitoring a Ruby application with Foreman and Upstart. That should point you in the right direction.