def start_app():
"""
Start the ExperimentManager as application
"""
global executor, threads
threads.append(executor.submit(api.start_listening))
config_t = configuration.init_sys()
cancel = False
while True:
for t in threads:
try:
if not cancel:
t.result(timeout=3)
else:
if t.running():
t.cancel()
except TimeoutError:
continue
except KeyboardInterrupt:
logger.info("received ctrl-c, shutting down...")
cancel = True
if get_config('database', 'drop_on_exit', False).lower() == 'true':
drop_tables()
configuration.stop.set()
config_t.join()
ExperimentManager.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录