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.
Comment | File | Size | Author |
---|---|---|---|
#11 | hook_cron_queue_info-2061275-11.patch | 725 bytes | StephaneQ |
#7 | hook_queue_info-2061275-7.patch | 772 bytes | StephaneQ |
#7 | hook_queue_info-2061275-7.interdiff.txt | 782 bytes | StephaneQ |
#4 | hook_queue_info-2061275-4.patch | 1.06 KB | StephaneQ |
#4 | hook_queue_info-2061275-4.interdiff.txt | 1.04 KB | StephaneQ |
Comments
Comment #1
jhodgdonGood 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...
Comment #2
StephaneQHere is the D8 patch
Comment #3
jhodgdonThanks! 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
Comment #4
StephaneQI'm not sure about the indentation fix, but well...
Comment #5
StephaneQComment #6
jhodgdonOh. Indentation - my mistake. Can you put it back the way it was? The other fix is right.
Comment #7
StephaneQComment #8
jhodgdonThanks!
Comment #9
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #10
jhodgdonNeeds backport.
Comment #11
StephaneQD7 patch
Comment #12
StephaneQComment #14
jhodgdon#11: hook_cron_queue_info-2061275-11.patch queued for re-testing.
Comment #16
jhodgdon#11: hook_cron_queue_info-2061275-11.patch queued for re-testing.
Comment #17
jhodgdonI don't know what all those failing tests were about ?!?. Ready to go now. Thanks!
Comment #18
jhodgdonThanks! Committed to 7.x.