コード例 #1
0
ファイル: perf_processes.py プロジェクト: zixian5/indy-node
 def sig_handler(self, sig):
     for prc, cln in self._clients.items():
         try:
             if not cln.is_finished() and cln.conn:
                 cln.conn.send(ClientStop())
             if sig == signal.SIGTERM:
                 prc.cancel()
         except Exception as e:
             print("Sent stop to client {} error {}".format(cln.name, e), file=self._out_file)
コード例 #2
0
ファイル: perf_processes.py プロジェクト: shntnkd/indy-node
 def sig_handler(self, sig):
     self._logger.debug("sig_handler sig {}".format(sig))
     for prc, cln in self._clients.items():
         self._logger.debug("sig_handler prc {} cln {}".format(prc, cln))
         try:
             if not cln.is_finished() and cln.conn:
                 cln.conn.send(ClientStop())
             if sig == signal.SIGTERM:
                 prc.cancel()
         except Exception as e:
             self._logger.exception(
                 "Sent stop to client {} error {}".format(cln.name, e))