Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

05/30/2012: Resque Me


  • 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)

  1. Jon says:

    There’s even a (my) pull request into resque scheduler pending and being ignored.

  2. A nicer person says:

    Quit your whining, you’re still alive.

    Work around the problem instead of blogging like a baby.

  3. Ben says:

    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.



  4. Matthew Kocher says:

    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.


Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *