public function listCommand($queue, $limit = 1)
    {
        $jobs = $this->jobManager->peek($queue, $limit);
        $totalCount = $this->queueManager->getQueue($queue)->countReady();
        foreach ($jobs as $job) {
            $this->outputLine('<b>%s</b>', [$job->getLabel()]);
        }

        if ($totalCount > count($jobs)) {
            $this->outputLine('(%d omitted) ...', [$totalCount - count($jobs)]);
        }
        $this->outputLine('(<b>%d total</b>)', [$totalCount]);
    }
public function listCommand($queue, $limit = 1)
    {
        $jobs = $this->jobManager->peek($queue, $limit);
        $totalCount = $this->queueManager->getQueue($queue)->countReady();
        foreach ($jobs as $job) {
            $this->outputLine('<b>%s</b>', [$job->getLabel()]);
        }

        if ($totalCount > count($jobs)) {
            $this->outputLine('(%d omitted) ...', [$totalCount - count($jobs)]);
        }
        $this->outputLine('(<b>%d total</b>)', [$totalCount]);
    }
public function listCommand ( $ queue , $ limit = 1 ) { $ jobs = $ this -> jobManager -> peek ( $ queue , $ limit ) ; $ totalCount = $ this -> queueManager -> getQueue ( $ queue ) -> countReady ( ) ; foreach ( $ jobs as $ job ) { $ this -> outputLine ( '<b>%s</b>' , [ $ job -> getLabel ( ) ] ) ; } if ( $ totalCount > count ( $ jobs ) ) { $ this -> outputLine ( '(%d omitted) ...' , [ $ totalCount - count ( $ jobs ) ] ) ; } $ this -> outputLine ( '(<b>%d total</b>)' , [ $ totalCount ] ) ; }
List queued jobs

Shows the label of the next <i>$limit</i> Jobs in a given queue.

@param string $queue The name of the queue
@param integer $limit Number of jobs to list (some queues only support a limit of 1)
@return void
@throws JobQueueException
List queued jobs