Add clear_all class method to LocalScheduler

This commit is contained in:
Roberto Rosario
2012-08-01 04:15:43 -04:00
parent f43f496241
commit dd00296c0a
2 changed files with 10 additions and 1 deletions
+2
View File
@@ -17,12 +17,14 @@ logger = logging.getLogger(__name__)
def schedule_shutdown_on_exit():
logger.debug('Schedulers shut down on exit')
LocalScheduler.shutdown_all()
LocalScheduler.clear_all()
if any([command in sys.argv for command in SHUTDOWN_COMMANDS]):
logger.debug('Schedulers shut down on SHUTDOWN_COMMAND')
# Shutdown any scheduler already running
LocalScheduler.shutdown_all()
LocalScheduler.clear_all()
# Prevent any new scheduler afterwards to start
LocalScheduler.lockdown()