Skip to content

Commit

Permalink
Scheduler before/after run ... restore saving retention on scheduling…
Browse files Browse the repository at this point in the history
… stop
  • Loading branch information
mohierf committed Feb 21, 2018
1 parent 749af5e commit bfd8f90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alignak/daemons/schedulerdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def do_loop_turn(self):
# If scheduling is not yet enabled, enable scheduling
if not self.sched.must_schedule:
self.sched.start_scheduling()
self.sched.before_run()
self.sched.run()
else:
logger.warning("#%d - No monitoring configuration to scheduler...",
Expand Down Expand Up @@ -546,6 +547,9 @@ def main(self):
# Now the main loop
self.do_main_loop()

# On main loop exit, call the scheduler after run process
self.sched.after_run()

self.request_stop()
except Exception:
self.exit_on_exception(traceback.format_exc())
Expand Down

0 comments on commit bfd8f90

Please sign in to comment.