本文整理汇总了Python中monitor.Monitor.join方法的典型用法代码示例。如果您正苦于以下问题:Python Monitor.join方法的具体用法?Python Monitor.join怎么用?Python Monitor.join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类monitor.Monitor
的用法示例。
在下文中一共展示了Monitor.join方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: monitor_torrent
# 需要导入模块: from monitor import Monitor [as 别名]
# 或者: from monitor.Monitor import join [as 别名]
def monitor_torrent():
"""
Monitoring remote transmission status
"""
print (green('Monitoring remote transmission status.'))
monitor = Monitor()
monitor.start()
monitor.join()
示例2: f2bcDaemon
# 需要导入模块: from monitor import Monitor [as 别名]
# 或者: from monitor.Monitor import join [as 别名]
class f2bcDaemon(daemon):
def __sigTERMhandler(self, signum, frame):
syslog.syslog ("Caught signal %d. Initiating shutdown..." % signum)
self.quit()
def run(self):
syslog.syslog ('fail2ban-zmq-tools Monitor starting.')
signal.signal(signal.SIGTERM, self.__sigTERMhandler)
signal.signal(signal.SIGINT, self.__sigTERMhandler)
self.monitor = Monitor(monitorconfig=monitorconfig)
syslog.syslog ('fail2ban-zmq-tools Monitor running. Main process waiting for termination signal. Threads working.')
self.monitor.start()
signal.pause()
syslog.syslog ('fail2ban-zmq-tools Monitor exiting.')
def quit(self):
syslog.syslog("fail2ban-zmq-tools Monitor received signal to quit.")
signal.signal(signal.SIGTERM,signal.SIG_IGN)
self.monitor.join()