API page: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

Page says:
'worker callback': The name of the function to call. It will be called with one argument, the item created via DrupalQueue::createItem() in hook_cron().

However DrupalQueue::createItem() could be called anywhere, not only in hook_cron(). I suggest to remove the last two words from the paragraph.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +Needs backport to D7

Good idea!

This documentation fix needs to first be applied to hook_queue_info() in drupal 8 (the new name of the hook) and then backported to Drupal 7.
https://api.drupal.org/api/drupal/core!modules!system!system.api.php/fun...

StephaneQ’s picture

Status: Active » Needs review
FileSize
771 bytes

Here is the D8 patch

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! While you're at it, could you fix another error in that same line of documentation? All namespaces in documentation should start with \

Sigh. As a bonus you could also fix the indentation on the list:
https://drupal.org/node/1354#lists

StephaneQ’s picture

I'm not sure about the indentation fix, but well...

StephaneQ’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

Oh. Indentation - my mistake. Can you put it back the way it was? The other fix is right.

StephaneQ’s picture

Status: Needs work » Needs review
FileSize
782 bytes
772 bytes
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Fixed » Patch (to be ported)

Needs backport.

StephaneQ’s picture

D7 patch

StephaneQ’s picture

Status: Patch (to be ported) » Needs review

Status: Needs review » Needs work
Issue tags: -Novice, -Needs backport to D7

The last submitted patch, hook_cron_queue_info-2061275-11.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, hook_cron_queue_info-2061275-11.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Needs review
Issue tags: +Novice, +Needs backport to D7
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

I don't know what all those failing tests were about ?!?. Ready to go now. Thanks!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 7.x.

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