Resque_Worker::__construct PHP Method

__construct() public method

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.
    public function __construct($queues)
    {
        $this->logger = new Resque_Log();
        if (!is_array($queues)) {
            $queues = array($queues);
        }
        $this->queues = $queues;
        $this->hostname = php_uname('n');
        $this->id = $this->hostname . ':' . getmypid() . ':' . implode(',', $this->queues);
    }

Usage Example

Exemplo n.º 1
0
 public function __construct($queues, $serviceManager = null)
 {
     if ($serviceManager !== null) {
         $this->setServiceManager($serviceManager);
     }
     parent::__construct($queues);
 }
All Usage Examples Of Resque_Worker::__construct