Reputation: 948
I'm wondering if resque-scheduler needs a resque instance to run the jobs in a specific queue, or it's mandatory for resque-scheduler to use the resque:work
task.
Thanks in advance.
Upvotes: 1
Views: 1189
Reputation: 5962
Resque Scheduler is basically a scheduler. It keeps looking for the schedule time and then, when it is time to execute them, it takes the arguments specified in the your resque scheduler.yml, and pushes the job into the queue specified in the scheduler.yml.
Now it up to resque task that is started by:
QUEUE=* rake resque:work
to pick the job from queue and operate on it.
Consider resque scheduler as a cron job
whose only task is to push the message in the specified queue. It is up to the resque-worker now to start processing it.
Upvotes: 1
Reputation: 154
Yes, you definitely need to have a resque worker running to process the jobs, with a command like this:
QUEUE=* rake resque:work
Resque-scheduler puts the jobs on a queue when it's time for them to be executed, but doesn't execute them itself. That's why you only run one instance of resque-scheduler, and as many resque workers as you need to keep up with the jobs.
Upvotes: 4