Currently, when trying to run a specific queue, providing a queue argument won't work because it won't be used in drush_advancedqueue_process_queue, this function expects instead an option but the option is not defined in the hook_drush_command

Comments

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new1.3 KB

Here's a proposed patch, this will allow you to run drush advancedqueue <queue> I'm not really sure about the explode(',' $queue); though.

amitaibu’s picture

Kicking testbot.

amitaibu’s picture

+++ b/drush/advancedqueue.drush.inc
@@ -24,15 +24,14 @@ function advancedqueue_drush_command() {
-  $queues = drush_get_option('queue');

Why remove the drush_get_option?

One should do drush advancedqueue --queue=foo,bar

jsacksick’s picture

Because the "queue" is declared as an argument in the hook_drush_command() not as an option. See below


/**
 * Implements hook_drush_command().
 */
function advancedqueue_drush_command() {
  $items = array();
  $items['advancedqueue-process-queue'] = array(
    'description' => 'Run a processing job for a queue.',
    'arguments' => array(
      'queue' => dt('The name of the queue to process.'),
    ),
    'options' => array(
      'timeout' => 'The maximum execution time of the script. Be warned that this is a rough estimate as the time is only checked between two items.',
      'all' => 'Process all queues.', 
    ),
    'aliases' => array('advancedqueue'),
  );
  return $items;
}

amitaibu’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.