X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FQueue%2FQueue7.php;fp=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FQueue%2FQueue7.php;h=0000000000000000000000000000000000000000;hp=21a65b514457aa113af8fb8714670435c3006a9e;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/drush/drush/lib/Drush/Queue/Queue7.php b/vendor/drush/drush/lib/Drush/Queue/Queue7.php deleted file mode 100644 index 21a65b514..000000000 --- a/vendor/drush/drush/lib/Drush/Queue/Queue7.php +++ /dev/null @@ -1,66 +0,0 @@ - $queue) { - static::$queues[$name]['worker callback'] = $queue['cron']['callback']; - if (isset($queue['cron']['time'])) { - static::$queues[$name]['time'] = $queue['cron']['time']; - } - } - } - return static::$queues; - } - - /** - * {@inheritdoc} - * - * @return \DrupalQueueInterface - */ - public function getQueue($name) { - return DrupalQueue::get($name); - } - - /** - * {@inheritdoc} - */ - public function run($name, $time_limit = 0) { - $info = $this->getInfo($name); - $function = $info['worker callback']; - $end = time() + $time_limit; - $queue = $this->getQueue($name); - $count = 0; - - while ((!$time_limit || time() < $end) && ($item = $queue->claimItem())) { - try { - drush_log(dt('Processing item @id from @name queue.', array('@name' => $name, 'id' => $item->item_id)), LogLevel::INFO); - $function($item->data); - $queue->deleteItem($item); - $count++; - } - catch (\Exception $e) { - // In case of exception log it and leave the item in the queue - // to be processed again later. - drush_set_error('DRUSH_QUEUE_EXCEPTION', $e->getMessage()); - } - } - - return $count; - } - -}