예제 #1
0
    def handle(self):

        with closing(self.odb.session()) as session:
            item = session.query(OutgoingSTOMP).filter_by(id=self.request.input.id).one()

        start_time = time()

        # Will connect and disconnect hence confirming the path to a broker.
        session = create_stomp_session(self.outgoing.stomp[item.name].config)
        session.disconnect()

        response_time = time() - start_time

        self.response.payload.info = 'Ping heartbeat submitted, took:`{0:03.4f} s`, check server logs for details.'.format(response_time)
예제 #2
0
파일: stomp.py 프로젝트: znavy/zato
    def handle(self):

        with closing(self.odb.session()) as session:
            item = session.query(OutgoingSTOMP).filter_by(
                id=self.request.input.id).one()

        start_time = time()

        # Will connect and disconnect hence confirming the path to a broker.
        session = create_stomp_session(self.outgoing.stomp[item.name].config)
        session.disconnect()

        response_time = time() - start_time

        self.response.payload.info = 'Ping heartbeat submitted, took:`{0:03.4f} s`, check server logs for details.'.format(
            response_time)
예제 #3
0
 def ping(self, config):
     session = create_stomp_session(config)
     session.disconnect()
예제 #4
0
 def ping(self, config):
     session = create_stomp_session(config)
     session.disconnect()