Skip to content

Commit

Permalink
Fix issue 3133 (#3793)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabanon authored and jmolivas committed Feb 17, 2018
1 parent 05812d0 commit 28c464d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/services/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ services:
- { name: drupal.command }
console.queue_debug:
class: Drupal\Console\Command\Debug\QueueCommand
arguments: ['@plugin.manager.queue_worker']
arguments: ['@queue', '@plugin.manager.queue_worker']
tags:
- { name: drupal.command }
console.libraries_debug:
Expand Down
11 changes: 9 additions & 2 deletions src/Command/Debug/QueueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Drupal\Console\Core\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Queue\QueueWorkerManagerInterface;

/**
Expand All @@ -19,6 +20,11 @@
*/
class QueueCommand extends Command
{
/**
* @var QueueFactory
*/
protected $queueFactory;

/**
* @var QueueWorkerManagerInterface
*/
Expand All @@ -29,8 +35,9 @@ class QueueCommand extends Command
*
* @param QueueWorkerManagerInterface $queueWorker
*/
public function __construct(QueueWorkerManagerInterface $queueWorker)
public function __construct(QueueFactory $queueFactory, QueueWorkerManagerInterface $queueWorker)
{
$this->queueFactory = $queueFactory;
$this->queueWorker = $queueWorker;
parent::__construct();
}
Expand Down Expand Up @@ -83,7 +90,7 @@ private function listQueues()
*/
private function formatQueue($name)
{
$q = $this->getDrupalService('queue')->get($name);
$q = $this->queueFactory->get($name);

return [
$name,
Expand Down

0 comments on commit 28c464d

Please sign in to comment.