public function QueueBase::listQueues

8.0.x QueueBase.php public QueueBase::listQueues()
7.x QueueBase.php public QueueBase::listQueues()
master QueueBase.php public QueueBase::listQueues()

Lists all available queues.

File

lib/Drush/Queue/QueueBase.php, line 17

Namespace

Drush\Queue

Class

QueueBase

Code

public function listQueues() {
  $result = array();
  foreach (array_keys($this->getQueues()) as $name) {
    $q = $this->getQueue($name);
    $result[$name] = array(
      'queue' => $name,
      'items' => $q->numberOfItems(),
      'class' => get_class($q),
    );
  }
  return $result;
}