protected function _workerCmd($workerCmd, $workerCount)
    {
        // Shell command builder
        $cmd = "{$workerCmd}/{$workerCount}";
        $cmd = ($this->logPath) ? "{$cmd} >> {$this->logPath}" : $cmd;

        // Process handler
        $process = proc_open("{$cmd} &", self::$_procDescriptorspec, $pipe);
        // Find out worker command's PID
        $status = proc_get_status($process);
        $pid = $status['pid'] + 1;
        // Stack workers
        $this->_pidStack[$workerCount] = $pid;
        // Close
        proc_close($process);

        // Log
        $time = date("Y-m-d H:i:s");
        $this->_log("Queue Listener - Dispatch Worker #{$workerCount} (PID: {$pid})");

        return true;
    }
protected function _workerCmd($workerCmd, $workerCount)
    {
        // Shell command builder
        $cmd = "{$workerCmd}/{$workerCount}";
        $cmd = ($this->logPath) ? "{$cmd} >> {$this->logPath}" : $cmd;

        // Process handler
        $process = proc_open("{$cmd} &", self::$_procDescriptorspec, $pipe);
        // Find out worker command's PID
        $status = proc_get_status($process);
        $pid = $status['pid'] + 1;
        // Stack workers
        $this->_pidStack[$workerCount] = $pid;
        // Close
        proc_close($process);

        // Log
        $time = date("Y-m-d H:i:s");
        $this->_log("Queue Listener - Dispatch Worker #{$workerCount} (PID: {$pid})");

        return true;
    }
protected function _workerCmd ( $ workerCmd , $ workerCount ) { // Shell command builder $ cmd = "{$workerCmd}/{$workerCount}" ; $ cmd = ( $ this -> logPath ) ? "{$cmd} >> {$this->logPath}" : $ cmd ; // Process handler $ process = proc_open ( "{$cmd} &" , self :: $ _procDescriptorspec , $ pipe ) ; // Find out worker command's PID $ status = proc_get_status ( $ process ) ; $ pid = $ status [ 'pid' ] + 1 ; // Stack workers $ this -> _pidStack [ $ workerCount ] = $ pid ; // Close proc_close ( $ process ) ; // Log $ time = date ( "Y-m-d H:i:s" ) ; $ this -> _log ( "Queue Listener - Dispatch Worker #{$workerCount} (PID: {$pid})" ) ; return true ; }
Command for creating a worker

@param string $workerCmd
@param integer $workerCount
@return string Command result
Command for creating a worker