Exemplo n.º 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)
Exemplo n.º 2
0
Arquivo: stomp.py Projeto: 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)
Exemplo n.º 3
0
 def ping(self, config):
     session = create_stomp_session(config)
     session.disconnect()
Exemplo n.º 4
0
 def ping(self, config):
     session = create_stomp_session(config)
     session.disconnect()