Commit 78fcca71 authored by Jonathan Michalon's avatar Jonathan Michalon

Add a few more debug (now that we use logging module)

parent 5c8d89c4
......@@ -66,14 +66,18 @@ class Check(object):
logging.debug('Running ' + str(self))
self.setup()
if not self.check():
logging.debug('Fail: ' + str(self))
self.retry_count = min(self.retry_count + 1, self.retry)
if self.retry_count == self.retry or immediate:
if self.ok:
logging.debug('Switched to failure: ' + str(self))
self.failure_date = datetime.now()
self.ok = False
mails.send_email_for_check(self)
else:
logging.debug('OK: ' + str(self))
if not self.ok:
logging.debug('Switched to ok: ' + str(self))
self.ok = True
mails.send_email_for_check(self)
self.retry_count = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment