The module uses the drush pre-cron hook to dequeue, but I think it would be easier for our end users if the module itself implemented hook_cron() and ran the dequeue there. If I want to use the functionality in the module then I don't have to go tell all my module users that they have to use drush to run cron anymore.

Are there more reasons besides the 'cron already running' problem why this can't be the default behavior?

CommentFileSizeAuthor
#1 873978-drupalqueue-cron.patch1.7 KBdave reid

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.7 KB
voxpelli’s picture

Could it be optional? I imagine that the reason hook_cron() isn't used is so that you can aggressively run many parallel workers on the queue? Most people won't need to do that, but for those who do it should be possible - right?

dave reid’s picture

@voxpelli: The patch in #1 makes it optional, but enabled by default as we shouldn't have to burden users with another manual cron job. By setting $conf['drupal_queue_on_cron'] = FALSE; this feature is disabled.

alex_b’s picture

Status: Needs review » Reviewed & tested by the community

#3: right. This is RTBC from my point of view, btw. Dave Reid: feel free to commit. Otherwise I'll get around to it one of these days.

zoo33’s picture

Patch tested with a custom queue implementation. Works fine on regular cron runs!

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS: http://drupal.org/cvs?commit=432654

Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.