function hook_hosting_queues_alter in Hosting 7.3
Same name and namespace in other branches
- 7.4 hosting.api.php \hook_hosting_queues_alter()
Alter module defined queue definitions before they are processed.
This hook is invoked before hosting calculates the number of items to process when processing queues, so, for example, you could alter the number of apparent items in the queue.
Parameters
array $queues: The array of queue definitions of queues provided by modules.
See also
hosting_get_queues
hook_hosting_queues
hook_hosting_processed_queues_alter
Related topics
1 invocation of hook_hosting_queues_alter()
- hosting_get_queues in ./
hosting.queues.inc - Retrieve a list of queues that need to be dispatched
File
- ./
hosting.api.php, line 156 - Hooks provided by the hosting module, and some other random ones.
Code
function hook_hosting_queues_alter(&$queues) {
if (isset($queues['cron'])) {
// Do not execute the cron queue at weekends.
if (date('N', REQUEST_TIME) > 5) {
$queues['cron']['total_items'] = 0;
}
}
}