function queue_drush_command

8.0.x queue.drush.inc queue_drush_command()
6.x queue.drush.inc queue_drush_command()
7.x queue.drush.inc queue_drush_command()
5.x queue.drush.inc queue_drush_command()
master queue.drush.inc queue_drush_command()

Implements hook_drush_command().

File

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

Code

function queue_drush_command() {
  $items['queue-run'] = array(
    'description' => 'Run a specific queue by name',
    'arguments' => array(
      'queue_name' => 'The name of the queue to run, as defined in either hook_queue_info or hook_cron_queue_info.',
    ),
    'required-arguments' => TRUE,
    'options' => array(
      'time-limit' => 'The maximum number of seconds allowed to run the queue',
    ),
  );
  $items['queue-list'] = array(
    'description' => 'Returns a list of all defined queues',
    'outputformat' => array(
      'default' => 'table',
      'pipe-format' => 'csv',
      'field-labels' => array(
        'queue' => 'Queue',
        'items' => 'Items',
        'class' => 'Class',
      ),
      'ini-item' => 'items',
      'table-metadata' => array(
        'key-value-item' => 'items',
      ),
      'output-data-type' => 'format-table',
    ),
  );
  $items['queue-delete'] = array(
    'description' => 'Delete all items in a specific queue',
    'arguments' => array(
      'queue_name' => 'The name of the queue to delete all items for, as defined in either hook_queue_info or hook_cron_queue_info.',
    ),
    'required-arguments' => TRUE,
  );

  return $items;
}