Resque_Worker::queues PHP Method

queues() public method

If * is found in the list of queues, every queue will be searched in alphabetic order. (@see $fetch)
public queues ( boolean $fetch = true ) : array
$fetch boolean If true, and the queue is set to *, will fetch all queue names from redis.
return array Array of associated queues.
    public function queues($fetch = true)
    {
        if (!in_array('*', $this->queues) || $fetch == false) {
            return $this->queues;
        }
        $queues = Resque::queues();
        sort($queues);
        return $queues;
    }

Usage Example

コード例 #1
0
ファイル: Worker.php プロジェクト: hlgrrnhrdt/laravel-resque
 /**
  * @return Queue[]
  */
 public function queues()
 {
     $queues = \array_map(function ($queue) {
         return new Queue($queue);
     }, $this->worker->queues());
     return $queues;
 }
All Usage Examples Of Resque_Worker::queues