function hook_mob_queue_queue_processing_alter in Drush Queue Handling 8
Same name and namespace in other branches
- 7 mob_queue.api.php \hook_mob_queue_queue_processing_alter()
Alter queue information while mob-queue is running.
Allows to alter the queue list and next-to-be-processed queue information. Caution: Make sure you understand how mob-queue works internally. Most of the time, you should alter the $queue_name and $queue_info variables in sync. However, you can change the queue name parameter independent from its info array and wreak havoc.
Parameters
string $queue_name: The queue name.
array $queue_info: The queue information array item as declared in the queue's hook_cron_queue_info().
array $queues: An array of cron queue information.
See also
hook_cron_queue_info()
2 invocations of hook_mob_queue_queue_processing_alter()
- drush_mob_queue_mob_exe_queue in ./
mob_queue.drush.inc - Run the queued job.
- MobQueueCommands::exeQueue in src/
Commands/ MobQueueCommands.php - Execute mob_queue queued tasks.
File
- ./
mob_queue.api.php, line 53 - Hooks provided by the Drush Queue Handling module.
Code
function hook_mob_queue_queue_processing_alter(&$queue_name, &$queue_info, &$queues) {
$some_priority_condition = TRUE;
$a_more_important_queue = 'important-queue';
if ($some_priority_condition) {
$queue_name = $a_more_important_queue;
$info = $queues[$a_more_important_queue];
}
}