__construct() public méthode

Passing a single '*' allows the worker to work on all queues in alphabetical order. You can easily add new queues dynamically and have them worked on using this method.
public __construct ( string | array $queues )
$queues string | array String with a single queue name, array with multiple.
Exemple #1
0
 public function __construct($queues, $serviceManager = null)
 {
     if ($serviceManager !== null) {
         $this->setServiceManager($serviceManager);
     }
     parent::__construct($queues);
 }
Exemple #2
0
 /**
  * @param array|string  $options
  * @param LoopInterface $loop
  *
  */
 public function __construct($options, LoopInterface $loop = null)
 {
     $this->options = $options;
     if ($loop !== null) {
         $this->loop = $loop;
         Resque::setEventLoop($loop);
     }
     parent::__construct($options['queue']);
 }
 public function __construct(sfProjectConfiguration $configuration, $queues, $options = array())
 {
     $this->configuration = $configuration;
     $this->options = $options;
     parent::__construct($queues);
 }
 /**
  * Constructor.
  */
 public function __construct($queues, $workerPid, $hostname = 'host')
 {
     parent::__construct($queues);
     $this->hostname = $hostname;
     $this->id = $hostname . ':' . (string) $workerPid . ':' . implode(',', $this->queues);
 }