Esempio n. 1
0
    def stop(self, msg):
        if self.dbLogHandler:
            log.info("Removing database log handler")
            rootLogger = logging.getLogger()
            rootLogger.removeHandler(self.dbLogHandler)

        log.info("Terminating database processes")
        for p in self.dbProcesses:
            try:
                log.info("Terminating process %d", p.pid)
                p.terminate()
            except:
                log.exception("Could not terminate process %d", p.pid)

        log.info("Waiting for database processes to terminate")
        for p in self.dbProcesses:
            p.wait()
            log.info("Process %d terminated", p.pid)
        log.info("All database processes terminated")

        NonBlockingDispatchAgent.stop(self, msg)
Esempio n. 2
0
 def stop(self, msg):
     if self.dbLogHandler:
         log.info("Removing database log handler")
         rootLogger = logging.getLogger()
         rootLogger.removeHandler(self.dbLogHandler)
         
     log.info("Terminating database processes")
     for p in self.dbProcesses:
         try:
             log.info("Terminating process %d", p.pid)
             p.terminate()
         except:
             log.exception("Could not terminate process %d", p.pid)
     
     log.info("Waiting for database processes to terminate")
     for p in self.dbProcesses:
         p.wait()
         log.info("Process %d terminated", p.pid)
     log.info("All database processes terminated")
     
     NonBlockingDispatchAgent.stop(self, msg)
Esempio n. 3
0
 def stop(self, msg):
     NonBlockingDispatchAgent.stop(self, msg)
     if self.commClient:
         self.commClient.stop()
Esempio n. 4
0
 def stop(self, msg):
     NonBlockingDispatchAgent.stop(self, msg)
     self.commServer.stop()
Esempio n. 5
0
 def stop(self, msg):
     NonBlockingDispatchAgent.stop(self, msg)
     self.commServer.stop()
Esempio n. 6
0
 def stop(self, msg):
     NonBlockingDispatchAgent.stop(self, msg)
     if self.commClient:
         self.commClient.stop()