function drush_queue_run

8.0.x queue.drush.inc drush_queue_run($queue_name)
6.x queue.drush.inc drush_queue_run($queue_name)
7.x queue.drush.inc drush_queue_run($queue_name)
5.x queue.drush.inc drush_queue_run($queue_name)
master queue.drush.inc drush_queue_run($queue_name)

Command callback for drush queue-run.

Queue runner that is compatible with queues declared using both hook_queue_info() and hook_cron_queue_info().

Parameters

$queue_name: Arbitrary string. The name of the queue to work with.

File

commands/core/queue.drush.inc, line 79

Code

function drush_queue_run($queue_name) {
  $queue = drush_queue_get_class();
  $time_limit = (int) drush_get_option('time-limit');
  $start = microtime(TRUE);
  $count = $queue->run($queue_name, $time_limit);
  $elapsed = microtime(TRUE) - $start;
  drush_log(dt('Processed @count items from the @name queue in @elapsed sec.', array('@count' => $count, '@name' => $queue_name, '@elapsed' => round($elapsed, 2))), drush_get_error() ? LogLevel::WARNING : LogLevel::OK);
}