public function checkSubscription()
    {
        if (!$this->subscriberSocket) {
            $this->subscriberSocket = $this->context->getSocket(\ZMQ::SOCKET_SUB);
            $this->subscriberSocket->connect($this->publisherPmSocketAddress);
            $this->subscriberSocket->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "");
        }

        $this->subscriptionMessage = @json_decode($this->subscriberSocket->recv(\ZMQ::MODE_DONTWAIT), true);

        if (($this->subscriptionMessage !== false) && ($this->subscriptionMessage !== null)
            && (is_array($this->subscriptionMessage) === false)
        ) {
            throw new ProcessManagerException("Not correct param from ProcessManager to TerminatorPauseStander: "
                . serialize($this->subscriptionMessage));
        }

        if (isset($this->subscriptionMessage)) {
            $this->logger->info("Receive subscription message: " . serialize($this->subscriptionMessage));
            $this->resolveAction();
        }

        return null;
    }
public function checkSubscription()
    {
        if (!$this->subscriberSocket) {
            $this->subscriberSocket = $this->context->getSocket(\ZMQ::SOCKET_SUB);
            $this->subscriberSocket->connect($this->publisherPmSocketAddress);
            $this->subscriberSocket->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "");
        }

        $this->subscriptionMessage = @json_decode($this->subscriberSocket->recv(\ZMQ::MODE_DONTWAIT), true);

        if (($this->subscriptionMessage !== false) && ($this->subscriptionMessage !== null)
            && (is_array($this->subscriptionMessage) === false)
        ) {
            throw new ProcessManagerException("Not correct param from ProcessManager to TerminatorPauseStander: "
                . serialize($this->subscriptionMessage));
        }

        if (isset($this->subscriptionMessage)) {
            $this->logger->info("Receive subscription message: " . serialize($this->subscriptionMessage));
            $this->resolveAction();
        }

        return null;
    }
public function checkSubscription ( ) { if ( ! $ this -> subscriberSocket ) { $ this -> subscriberSocket = $ this -> context -> getSocket ( \ ZMQ :: SOCKET_SUB ) ; $ this -> subscriberSocket -> connect ( $ this -> publisherPmSocketAddress ) ; $ this -> subscriberSocket -> setSockOpt ( \ ZMQ :: SOCKOPT_SUBSCRIBE , "" ) ; } $ this -> subscriptionMessage = @ json_decode ( $ this -> subscriberSocket -> recv ( \ ZMQ :: MODE_DONTWAIT ) , true ) ; if ( ( $ this -> subscriptionMessage !== false ) && ( $ this -> subscriptionMessage !== null ) && ( is_array ( $ this -> subscriptionMessage ) === false ) ) { throw new ProcessManagerException ( "Not correct param from ProcessManager to TerminatorPauseStander: " . serialize ( $ this -> subscriptionMessage ) ) ; } if ( isset ( $ this -> subscriptionMessage ) ) { $ this -> logger -> info ( "Receive subscription message: " . serialize ( $ this -> subscriptionMessage ) ) ; $ this -> resolveAction ( ) ; } return null ; }
Check if subscription contain pid of process
@return mixed
Check if subscription contain pid of process