예제 #1
0
 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()
예제 #2
0
 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()
예제 #3
0
 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()
예제 #4
0
 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()
예제 #5
0
 def attach_sql_listener(self, db_uri):
     plog("DEBUG", "Got sqlite: " + db_uri)
     SQLSupport.setup_db(db_uri, echo=False, drop=True)
     self.sql_consensus_listener = SQLSupport.ConsensusTrackerListener()
     self.add_event_listener(self.sql_consensus_listener)
     self.add_event_listener(SQLSupport.StreamListener())
예제 #6
0
 def attach_sql_listener(self, db_uri):
     plog("DEBUG", "Got sqlite: " + db_uri)
     SQLSupport.setup_db(db_uri, echo=False, drop=True)
     self.sql_consensus_listener = SQLSupport.ConsensusTrackerListener()
     self.add_event_listener(self.sql_consensus_listener)
     self.add_event_listener(SQLSupport.StreamListener())