public function onWorkerHandlerMessage(MessageInterface $msg)
    {
        $this->workerHandlerReady = true;
        $this->worker->touch();

        if ($msg instanceof Destroy) {
            $this->worker->setState(Worker::INVALID);

            return;
        }

        if ($msg instanceof ExecuteJobRequest) {
            $this->startJob($msg);

            return;
        }

        if ($msg instanceof HeartbeatResponseWorkerhandler) {
            $this->handleHeartbeatResponse();

            return;
        }

        $this->getLogger()->error('Unknown worker-handler response: '.get_class($msg).'.');
    }
public function onWorkerHandlerMessage(MessageInterface $msg)
    {
        $this->workerHandlerReady = true;
        $this->worker->touch();

        if ($msg instanceof Destroy) {
            $this->worker->setState(Worker::INVALID);

            return;
        }

        if ($msg instanceof ExecuteJobRequest) {
            $this->startJob($msg);

            return;
        }

        if ($msg instanceof HeartbeatResponseWorkerhandler) {
            $this->handleHeartbeatResponse();

            return;
        }

        $this->getLogger()->error('Unknown worker-handler response: '.get_class($msg).'.');
    }
public function onWorkerHandlerMessage ( MessageInterface $ msg ) { $ this -> workerHandlerReady = true ; $ this -> worker -> touch ( ) ; if ( $ msg instanceof Destroy ) { $ this -> worker -> setState ( Worker :: INVALID ) ; return ; } if ( $ msg instanceof ExecuteJobRequest ) { $ this -> startJob ( $ msg ) ; return ; } if ( $ msg instanceof HeartbeatResponseWorkerhandler ) { $ this -> handleHeartbeatResponse ( ) ; return ; } $ this -> getLogger ( ) -> error ( 'Unknown worker-handler response: ' . get_class ( $ msg ) . '.' ) ; }
Handles a Message from the Worker Handler.

@param MessageInterface $msg
Handles a Message from the Worker Handler .