protected function getWorker()
    {
        $instance = $this->getCurrentInstance();
        if($instance) {
            // Initialized with the current instance
            
            $worker = $this->get('ringo_php_redmon.instance_worker')->setInstance($instance);
            // We return worker only if the server is up
            if($worker->ping()) {
                return $worker;
            }
            // If we can't ping the server, current instance is removed from session
            $this->getRequest()->getSession()->set('instance', null);
            
            return false;
        }
        return false;
    }
protected function getWorker()
    {
        $instance = $this->getCurrentInstance();
        if($instance) {
            // Initialized with the current instance
            
            $worker = $this->get('ringo_php_redmon.instance_worker')->setInstance($instance);
            // We return worker only if the server is up
            if($worker->ping()) {
                return $worker;
            }
            // If we can't ping the server, current instance is removed from session
            $this->getRequest()->getSession()->set('instance', null);
            
            return false;
        }
        return false;
    }
protected function getWorker ( ) { $ instance = $ this -> getCurrentInstance ( ) ; if ( $ instance ) { // Initialized with the current instance $ worker = $ this -> get ( 'ringo_php_redmon.instance_worker' ) -> setInstance ( $ instance ) ; // We return worker only if the server is up if ( $ worker -> ping ( ) ) { return $ worker ; } // If we can't ping the server, current instance is removed from session $ this -> getRequest ( ) -> getSession ( ) -> set ( 'instance' , null ) ; return false ; } return false ; }
Get instance worker initialized with current instance

@return boolean
Get instance worker initialized with current instance