Helps
- Using resque-scheduler with resque-status
We’re attempting to use both of these together, and encountered problems getting it to work.
Another project had found the answer. Resque scheduler only calls the correct method if you provide a custom_job_class in your yaml file:
This code from resque scheduler is the smoking gun:
if (job_klass = job_config['custom_job_class']) && (job_klass != 'Resque::Job')
constantize(job_klass).scheduled(queue, klass_name, *params)
end
There’s even a (my) pull request into resque scheduler pending and being ignored.
https://github.com/bvandenbos/resque-scheduler/pull/127
May 30, 2012 at 11:06 am
Quit your whining, you’re still alive.
Work around the problem instead of blogging like a baby.
May 30, 2012 at 4:56 pm
Haha, you suck
RTFM!
https://github.com/bvandenbos/resque-scheduler#support-for-resque-status-and-other-custom-jobs
May 30, 2012 at 4:57 pm
Hey guys,
Yeah, admittedly, the support for custom job classes is clunky at best. I didn’t want to support it at all, but kept getting pull requests. Tried to explain it in the README, but it’s not easily discoverable. Generally, I stay away from plugins that change the job interface (ie: resque-status).
I’ll take a look at the pull request, but it sort of feels awkward to set a var to indicate custom job. That discussion can take place on github.
cheers,
ben
May 30, 2012 at 5:06 pm
Thanks Ben – I think the confusions results from the naming of custom_job_class. It seems like it’s noise in the example, because your job name isn’t the name of the class. In reality, it’s what triggers calling the correct method.
Documentation pull request incoming.
Matthew
May 30, 2012 at 7:43 pm