removed deamon in TaskExecutor Thread and stopped manually according to "shutdown_wait" in core

This commit is contained in:
RafTim 2013-11-09 02:42:51 +01:00
commit e0bd6ad0ea
2 changed files with 9 additions and 5 deletions

View file

@ -158,13 +158,16 @@ def main():
logger.debug("shutting down scheduler")
shutdown_wait = True
if "shutdown_wait" in core:
shutdown_wait = core["shutdown_wait"]
scheduler.shutdown(wait=shutdown_wait)
logging.shutdown()
if shutdown_wait:
TaskExecutor.Instance().stop()
else:
TaskExecutor.Instance().stop_immediately()
if __name__ == "__main__":