function elysia_cron_cronapi in Elysia Cron 6.2
Same name and namespace in other branches
- 7.2 elysia_cron.module \elysia_cron_cronapi()
File
- ./
elysia_cron.module, line 1603
Code
function elysia_cron_cronapi($op, $job = false) {
$items = array();
if (EC_DRUPAL_VERSION >= 7) {
$queues = module_invoke_all('cron_queue_info');
drupal_alter('cron_queue_info', $queues);
foreach ($queues as $queue_name => $info) {
// Make sure every queue exists. There is no harm in trying to recreate an
// existing queue.
$queue = DrupalQueue::get($queue_name);
$queue
->createQueue();
$items['queue_' . $queue_name] = array(
'description' => $queue_name . ' queue processing (Items count: <strong>' . $queue
->numberOfItems() . '</strong>, worker max duration: <strong>' . (isset($info['time']) ? $info['time'] . 's' : t('unspecified') . ' (15s)') . '</strong>)',
'rule' => variable_get('elysia_cron_queue_default_rule', false),
'weight' => variable_get('elysia_cron_queue_default_weight', 100),
'callback' => 'elysia_cron_queue_exec',
'arguments' => array(
$queue_name,
$info,
),
);
}
}
return $items;
}