protected function changeWorkerState(string $workerId, int $workerState) : bool
    {
        $this->workerStates[$workerId] = $workerState;
        if ($workerState === Worker::WORKER_STATE_IDLE) {
            $this->pushJobs();
        }
        return true;
    }
protected function changeWorkerState(string $workerId, int $workerState) : bool
    {
        $this->workerStates[$workerId] = $workerState;
        if ($workerState === Worker::WORKER_STATE_IDLE) {
            $this->pushJobs();
        }
        return true;
    }
protected function changeWorkerState ( string $ workerId , int $ workerState ) : bool { $ this -> workerStates [ $ workerId ] = $ workerState ; if ( $ workerState === Worker :: WORKER_STATE_IDLE ) { $ this -> pushJobs ( ) ; } return true ; }
Changes the state a worker currently has.

@param string $workerId
@param int $workerState
@return bool
Changes the state a worker currently has .