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

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

parent 5c8d89c4
...@@ -66,14 +66,18 @@ class Check(object): ...@@ -66,14 +66,18 @@ class Check(object):
logging.debug('Running ' + str(self)) logging.debug('Running ' + str(self))
self.setup() self.setup()
if not self.check(): if not self.check():
logging.debug('Fail: ' + str(self))
self.retry_count = min(self.retry_count + 1, self.retry) self.retry_count = min(self.retry_count + 1, self.retry)
if self.retry_count == self.retry or immediate: if self.retry_count == self.retry or immediate:
if self.ok: if self.ok:
logging.debug('Switched to failure: ' + str(self))
self.failure_date = datetime.now() self.failure_date = datetime.now()
self.ok = False self.ok = False
mails.send_email_for_check(self) mails.send_email_for_check(self)
else: else:
logging.debug('OK: ' + str(self))
if not self.ok: if not self.ok:
logging.debug('Switched to ok: ' + str(self))
self.ok = True self.ok = True
mails.send_email_for_check(self) mails.send_email_for_check(self)
self.retry_count = 0 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