4 ms·
Looks pretty awesome. I'd love to use it on an upcoming project. 2 questions: 1. Do jobs (in app/jobs/whatever.rb) have full access to your Rails models (so y
by callmeed 16y ago
Looks pretty awesome. I'd love to use it on an upcoming project.
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
- malomalo 16y ago1. Yes 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
- kgo 16y ago1. It's optional. "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.