public function startJob(ExecuteJobRequest $request)
    {
        $this->worker->setState(Worker::BUSY);

        $requestId = $request->getRequestId();
        $action    = $request->getAction();
        if (!$this->worker->hasAction($action)) {
            $this->getLogger()->debug('Action '.$action.' not found.');
            $this->sendToWorkerHandler(new ActionNotFound($requestId, $action));

            return;
        }

        $this->getLogger()->debug('Sending new request ('.$requestId.') to action '.$action);
        $this->serviceStream->send($request);
    }
public function startJob(ExecuteJobRequest $request)
    {
        $this->worker->setState(Worker::BUSY);

        $requestId = $request->getRequestId();
        $action    = $request->getAction();
        if (!$this->worker->hasAction($action)) {
            $this->getLogger()->debug('Action '.$action.' not found.');
            $this->sendToWorkerHandler(new ActionNotFound($requestId, $action));

            return;
        }

        $this->getLogger()->debug('Sending new request ('.$requestId.') to action '.$action);
        $this->serviceStream->send($request);
    }
public function startJob ( ExecuteJobRequest $ request ) { $ this -> worker -> setState ( Worker :: BUSY ) ; $ requestId = $ request -> getRequestId ( ) ; $ action = $ request -> getAction ( ) ; if ( ! $ this -> worker -> hasAction ( $ action ) ) { $ this -> getLogger ( ) -> debug ( 'Action ' . $ action . ' not found.' ) ; $ this -> sendToWorkerHandler ( new ActionNotFound ( $ requestId , $ action ) ) ; return ; } $ this -> getLogger ( ) -> debug ( 'Sending new request (' . $ requestId . ') to action ' . $ action ) ; $ this -> serviceStream -> send ( $ request ) ; }
Starts a Job.

@param ExecuteJobRequest $request
Starts a Job .