public function getPendingJobsCount($queue)
    {
        $driver_class = "\\Eyewitness\\Eye\\Queue\\Handlers\\".ucfirst(strtolower($queue->driver)).'Queue';

        if (! class_exists($driver_class)) {
            $this->eye->logger()->error('Queue Driver does not exist', $driver_class);
            return 0;
        }

        try {
            $qm = app(QueueManager::class)->connection($queue->connection);

            return (new $driver_class($qm, $queue))->pendingJobsCount($queue->tube);
        } catch (Exception $e) {
            $this->eye->logger()->debug('Unable to find Queue connection', ['exception' => $e->getMessage(), 'connection' => $queue->connection]);
        }

        return -1;
    }
public function getPendingJobsCount($queue)
    {
        $driver_class = "\\Eyewitness\\Eye\\Queue\\Handlers\\".ucfirst(strtolower($queue->driver)).'Queue';

        if (! class_exists($driver_class)) {
            $this->eye->logger()->error('Queue Driver does not exist', $driver_class);
            return 0;
        }

        try {
            $qm = app(QueueManager::class)->connection($queue->connection);

            return (new $driver_class($qm, $queue))->pendingJobsCount($queue->tube);
        } catch (Exception $e) {
            $this->eye->logger()->debug('Unable to find Queue connection', ['exception' => $e->getMessage(), 'connection' => $queue->connection]);
        }

        return -1;
    }
public function getPendingJobsCount ( $ queue ) { $ driver_class = "\\Eyewitness\\Eye\\Queue\\Handlers\\" . ucfirst ( strtolower ( $ queue -> driver ) ) . 'Queue' ; if ( ! class_exists ( $ driver_class ) ) { $ this -> eye -> logger ( ) -> error ( 'Queue Driver does not exist' , $ driver_class ) ; return 0 ; } try { $ qm = app ( QueueManager :: class ) -> connection ( $ queue -> connection ) ; return ( new $ driver_class ( $ qm , $ queue ) ) -> pendingJobsCount ( $ queue -> tube ) ; } catch ( Exception $ e ) { $ this -> eye -> logger ( ) -> debug ( 'Unable to find Queue connection' , [ 'exception' => $ e -> getMessage ( ) , 'connection' => $ queue -> connection ] ) ; } return - 1 ; }
Get the number of pending jobs for this queue tube.

@param  \Eyewitness\Eye\Repo\Queue  $queue
@return int
Get the number of pending jobs for this queue tube .