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")
def checktime(self): logging.info("begin to check timeout") self.websockets = list(filter(lambda x: not x.checktimeout(), self.websockets)) SubConnectionMgr.check()
def checktime(self): SubConnectionMgr.check()