summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-05-09 11:54:05 -0400
committerTom Ritter <tom@ritter.vg>2016-05-09 11:54:23 -0400
commit42489bc43ea3216e0422eceef126d2b81596635d (patch)
treeb36ad25ae4bf37eb7a7e35154d38f70a7c936f34
parent72365ece894883a2dd4b2e5add38743e3a1cd509 (diff)
If we get an error somewhere in the code, record it as a failure for our peers to report.
-rwxr-xr-xmain.py9
1 files 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()