You are here

function elysia_cron_queue_exec in Elysia Cron 6.2

Same name and namespace in other branches
  1. 7.2 elysia_cron.module \elysia_cron_queue_exec()
1 string reference to 'elysia_cron_queue_exec'
elysia_cron_cronapi in ./elysia_cron.module

File

./elysia_cron.module, line 1627

Code

function elysia_cron_queue_exec($queue_name, $info) {
  $function = $info['worker callback'];
  $end = time() + (isset($info['time']) ? $info['time'] : 15);
  $queue = DrupalQueue::get($queue_name);
  while (time() < $end && ($item = $queue
    ->claimItem())) {
    $function($item->data);
    $queue
      ->deleteItem($item);
  }
}