function drush_advancedqueue_get_queues in Advanced Queue 7
Get queues defined with hook_advanced_queue_info().
Return value
Array of queues indexed by name and containing queue object and number of items.
1 call to drush_advancedqueue_get_queues()
- drush_advancedqueue_list in drush/
advancedqueue.drush.inc - Command callback for drush advancedqueue-list.
File
- drush/
advancedqueue.drush.inc, line 146 - Drush worker for Advanced-queue.
Code
function drush_advancedqueue_get_queues() {
$queues =& drupal_static(__FUNCTION__);
if (!isset($queues)) {
$advanced_queues = module_invoke_all('advanced_queue_info');
drupal_alter('advanced_queue_info', $advanced_queues);
$queues = array();
foreach ($advanced_queues as $name => $queue) {
$queues[$name] = array(
'cron' => array(
'callback' => $queue['worker callback'],
'time' => $queue['time'],
),
);
}
}
return $queues;
}