bvandenbos/resque-scheduler — pull request #171 by noahd1 (2012-07-29 05:41:32+00:00)
Title: Better fix for "queue" name issue with custom_job_classes

Note that this fix supersedes the fix I proposed in Issue #170.

Since much of the resque-scheduler code expects the job "class" to be set to something reasonable, I made sure that "class" it is set to the "custom_job_class" if the "class" was not explicitly defined. Some of this behavior in ragards to custom_job_class and class is very confusing, but I'll leave that for another issue.

For more detail about the exact issue that I'm attempting to address, see below:

In the scenario where:
- the job spec defines a "custom_job_class"
- the job spec does not define a "class" (my expectation is that it shouldn't have to if it's specified a custom one)
- the job spec does not define a "queue" (since the custom_job_class does)

A proper queue would not be determined for the custom job class, which caused:

- the schedule tab in resque-web to raise a 500 error
- jobs to be enqueued to "false" instead of the queue defined in the custom job class