From 42489bc43ea3216e0422eceef126d2b81596635d Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Mon, 9 May 2016 11:54:05 -0400 Subject: If we get an error somewhere in the code, record it as a failure for our peers to report. --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 6324aff..aee4264 100755 --- a/main.py +++ b/main.py @@ -67,7 +67,10 @@ if __name__ == "__main__": sys.exit(-1) else: log.info("Running cron at frequency " + args.crontime) - if jobManager.execute_jobs(args.crontime): - jobManager.mark_jobs_ran() - else: + try: + if jobManager.execute_jobs(args.crontime): + jobManager.mark_jobs_ran() + else: + jobManager.mark_jobs_ran_with_error() + except: jobManager.mark_jobs_ran_with_error() -- cgit v1.2.3