本文整理汇总了Python中JobManager.initialize方法的典型用法代码示例。如果您正苦于以下问题:Python JobManager.initialize方法的具体用法?Python JobManager.initialize怎么用?Python JobManager.initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JobManager
的用法示例。
在下文中一共展示了JobManager.initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getLogger
# 需要导入模块: import JobManager [as 别名]
# 或者: from JobManager import initialize [as 别名]
if cm.get("ts.daemonize"):
if pidfile:
getLogger().info("Daemonizing, using pid file %s..." % pidfile)
else:
getLogger().info("Daemonizing...")
Tools.daemonize(pidFilename = pidfile, displayPid = True)
# Main start
cm.set_transient("ts.pid", os.getpid())
try:
serverThread = XmlRpcServerThread() # Ws server
FileSystemManager.initialize()
EventManager.initialize() # Xc server, Ih server [TSE:CH], Il server [TSE:TL]
ProbeManager.initialize() # Ia client
JobManager.initialize() # Job scheduler
serverThread.start()
getLogger().info("Started.")
while 1:
time.sleep(1)
except KeyboardInterrupt:
getLogger().info("Shutting down Testerman Server...")
except Exception, e:
sys.stderr.write("Unable to start server: %s\n" % str(e))
getLogger().critical("Unable to start server: " + str(e))
serverThread.stop()
JobManager.finalize()
ProbeManager.finalize()
EventManager.finalize()
FileSystemManager.finalize()