src/Worker.php
protected function refreshQueues()
    {
        if ($this->refreshQueues) {
            $this->queues = $this->resque->queues();
        }

        if (!$this->queues) {
            if ($this->refreshQueues) {
                $this->logger->info('Refreshing queues dynamically, but there are no queues yet');
            } else {
                $this->logger->notice('Not listening to any queues, and dynamic queue refreshing is disabled');
                $this->shutdownNow();
            }
        }

        // Each call to reserve, we check the queues in a different order
        if ($this->options['shuffle_queues']) {
            shuffle($this->queues);
        } elseif ($this->options['sort_queues']) {
            sort($this->queues);
        }
    }
protected function refreshQueues()
    {
        if ($this->refreshQueues) {
            $this->queues = $this->resque->queues();
        }

        if (!$this->queues) {
            if ($this->refreshQueues) {
                $this->logger->info('Refreshing queues dynamically, but there are no queues yet');
            } else {
                $this->logger->notice('Not listening to any queues, and dynamic queue refreshing is disabled');
                $this->shutdownNow();
            }
        }

        // Each call to reserve, we check the queues in a different order
        if ($this->options['shuffle_queues']) {
            shuffle($this->queues);
        } elseif ($this->options['sort_queues']) {
            sort($this->queues);
        }
    }
protected function refreshQueues ( ) { if ( $ this -> refreshQueues ) { $ this -> queues = $ this -> resque -> queues ( ) ; } if ( ! $ this -> queues ) { if ( $ this -> refreshQueues ) { $ this -> logger -> info ( 'Refreshing queues dynamically, but there are no queues yet' ) ; } else { $ this -> logger -> notice ( 'Not listening to any queues, and dynamic queue refreshing is disabled' ) ; $ this -> shutdownNow ( ) ; } } // Each call to reserve, we check the queues in a different order if ( $ this -> options [ 'shuffle_queues' ] ) { shuffle ( $ this -> queues ) ; } elseif ( $ this -> options [ 'sort_queues' ] ) { sort ( $ this -> queues ) ; } }
Prepares the list of queues for a job to reserved

Updates/sorts/shuffles the array ahead of the call to reserve a job from one of them

@return void
Prepares the list of queues for a job to reserved