def notlambda(this): cond.acquire() ScanHandler.reset_stats(self) SQLSupport.reset_all() this.sql_consensus_listener.update_consensus() this.sql_consensus_listener._update_rank_history(this.sql_consensus_listener.consensus.ns_map.iterkeys()) SQLSupport.refresh_all() cond.notify() cond.release()
def save_sql_file(self, sql_file, new_file): cond = threading.Condition() def notlambda(this): cond.acquire() SQLSupport.tc_session.close() try: shutil.copy(sql_file, new_file) except Exception,e: plog("WARN", "Error moving sql file: "+str(e)) SQLSupport.reset_all() cond.notify() cond.release()