示例#1
0
    def execstart(self):
        # get one rabbitmq connection
        self._pikaclient = SubConnectionMgr.connection()
        if self._pikaclient:
            self._pikaclient.addconsumer(self)

        #create the channel if the connection is opened
        if self._pikaclient.isconnected():
            self.connect()
        else:
            _logger.debug("pika is not connected")
示例#2
0
 def checktime(self):
     logging.info("begin to check timeout")
     self.websockets = list(filter(lambda x: not x.checktimeout(), self.websockets))
     SubConnectionMgr.check()
示例#3
0
 def checktime(self):
     SubConnectionMgr.check()