function advancedqueue_get_queues_info in Advanced Queue 7
Return queue(s) info.
@params $queue_names Optional; Array with the queue names. If empty, return all the queues.
3 calls to advancedqueue_get_queues_info()
- advancedqueue_cron in ./
advancedqueue.module - Implements hook_cron().
- advancedqueue_handler_field_queue_name::render in views/
advancedqueue_handler_field_queue_name.inc - Render the field.
- drush_advancedqueue_process_queue in drush/
advancedqueue.drush.inc - Command callback for drush advancedqueue-process-queue.
File
- ./
advancedqueue.module, line 143 - Helper module for advanced queuing.
Code
function advancedqueue_get_queues_info($queue_names = array()) {
$queues_info =& drupal_static(__FUNCTION__, array());
if (empty($queues_info)) {
$queues_info = module_invoke_all('advanced_queue_info');
// Add default values.
foreach ($queues_info as &$queue_info) {
$queue_info += array(
'delete when completed' => TRUE,
'retry after' => FALSE,
'max attempts' => 10,
'lease time' => 30,
'skip hooks' => FALSE,
'groups' => array(),
);
}
drupal_alter('advanced_queue_info', $queues_info);
uasort($queues_info, 'drupal_sort_weight');
}
if ($queue_names) {
return array_intersect_key($queues_info, $queue_names);
}
return $queues_info;
}