These are primarily messaging systems. I've considered using them before. Nothing, however, has come close to letting me do introspection like Resque does, and the best part is that I don't need to do any work to get it.
For me it was because I was unable to access the log files if a job failed since I was on Heroku. Also it gives me a general idea of how the system behaves; in one second I can tell if the system is normal. I can tell if I need to bump some workers up for a certain queue. Basically it saves me from creating my own 'dashboard'.
2. Just use the "rake resque:work" task and I recommend using something like upstart that works awesome, but I have also done it with monit and both work great
"rake environment resque:work" will give you access to the whole rails environment, so you can write normal rails code. But it of course uses a bunch of memory.
If you're doing something quick and dirty and don't need the rails model (sending out a password email or whatever), you can just run "rake resque:work" and avoid the overhead of the whole rails environment.
19 comments
[ 5.4 ms ] story [ 63.2 ms ] threadI'm not seeing an obvious benefit for people self-hosting though.
2 questions:
1. Do jobs (in app/jobs/whatever.rb) have full access to your Rails models (so you can pass it an ID and it can do whatever)?
2. How does the rake task/worker best work in a production environment (other than Heroku)? Use monit to keep the worker(s) up?
Thanks
2. Just use the "rake resque:work" task and I recommend using something like upstart that works awesome, but I have also done it with monit and both work great
"rake environment resque:work" will give you access to the whole rails environment, so you can write normal rails code. But it of course uses a bunch of memory.
If you're doing something quick and dirty and don't need the rails model (sending out a password email or whatever), you can just run "rake resque:work" and avoid the overhead of the whole rails environment.
Also, for the extremely anal, uri-redis is aware of the database number:
require 'resque'
MyApp::Application.routes.draw do
endRequires Rails 3.