def check_flow(self,**k): cf = None try: cf = FlowCheck(self) cf.run() except Exception as ex: log_error(self.v) if cf is not None: cf._unlock()
def check_flow(self, **k): cf = None try: cf = FlowCheck(self) cf.run() except Exception as ex: log_error(self.v) if cf is not None: cf._unlock()
def do_flush(self,**k): if self._flow_check: raise RuntimeError("already working") try: cf = Flusher(self) # Safety timer timer = gevent.spawn_later(self.d.db_max_flow_wait,connwrap,cf.dead) cf.start() res = cf.q.get() self.log("End flow check: %s"%(res,)) timer.kill() except Exception as ex: print_exc() try: log_error(self.d.site) if cf is not None: cf._unlock() except: print_exc() raise
def do_flush(self, **k): if self._flow_check: raise RuntimeError("already working") try: cf = Flusher(self) # Safety timer timer = gevent.spawn_later(self.d.db_max_flow_wait, connwrap, cf.dead) cf.start() res = cf.q.get() self.log("End flow check: %s" % (res, )) timer.kill() except Exception as ex: print_exc() try: log_error(self.d.site) if cf is not None: cf._unlock() except: print_exc() raise