public function get()
    {
        $processes = $this->processes();

        return collect($this->waitTime->calculate())
            ->map(function ($waitTime, $queue) use ($processes) {
                [$connection, $queueName] = explode(':', $queue, 2);

                $length = ! Str::contains($queue, ',')
                    ? $this->queue->connection($connection)->readyNow($queueName)
                    : collect(explode(',', $queueName))->sum(function ($queueName) use ($connection) {
                        return $this->queue->connection($connection)->readyNow($queueName);
                    });

                return [
                    'name' => $queueName,
                    'length' => $length,
                    'wait' => $waitTime,
                    'processes' => $processes[$queue] ?? 0,
                ];
            })->values()->toArray();
    }
public function get()
    {
        $processes = $this->processes();

        return collect($this->waitTime->calculate())
            ->map(function ($waitTime, $queue) use ($processes) {
                [$connection, $queueName] = explode(':', $queue, 2);

                $length = ! Str::contains($queue, ',')
                    ? $this->queue->connection($connection)->readyNow($queueName)
                    : collect(explode(',', $queueName))->sum(function ($queueName) use ($connection) {
                        return $this->queue->connection($connection)->readyNow($queueName);
                    });

                return [
                    'name' => $queueName,
                    'length' => $length,
                    'wait' => $waitTime,
                    'processes' => $processes[$queue] ?? 0,
                ];
            })->values()->toArray();
    }
public function get ( ) { $ processes = $ this -> processes ( ) ; return collect ( $ this -> waitTime -> calculate ( ) ) -> map ( function ( $ waitTime , $ queue ) use ( $ processes ) { [ $ connection , $ queueName ] = explode ( ':' , $ queue , 2 ) ; $ length = ! Str :: contains ( $ queue , ',' ) ? $ this -> queue -> connection ( $ connection ) -> readyNow ( $ queueName ) : collect ( explode ( ',' , $ queueName ) ) -> sum ( function ( $ queueName ) use ( $ connection ) { return $ this -> queue -> connection ( $ connection ) -> readyNow ( $ queueName ) ; } ) ; return [ 'name' => $ queueName , 'length' => $ length , 'wait' => $ waitTime , 'processes' => $ processes [ $ queue ] ?? 0 , ] ; } ) -> values ( ) -> toArray ( ) ; }
Get the current workload of each queue.

@return array
Get the current workload of each queue .