From 869de79cc6483f5583b2f9bddd08720d103c8bec Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Tue, 26 Jan 2016 01:15:03 -0500 Subject: Differentiating between a mail problem and jobs not being run. --- statustracker.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'statustracker.py') diff --git a/statustracker.py b/statustracker.py index 2c3350c..d092266 100755 --- a/statustracker.py +++ b/statustracker.py @@ -11,12 +11,14 @@ class StatusTracker: self.lastRunJob = 0 self.config = config - def isAllGood(self): - return self.emailNotificationsAreWorking and \ - time.time() - self.lastRunJob < 120 + def isMailGood(self): + return self.emailNotificationsAreWorking + + def isJobsGood(self): + return time.time() - self.lastRunJob < 120 def markJobRan(self): self.lastRunJob = time.time() def markEmailStatus(self, working): - self.emailNotificationsAreWorking = working \ No newline at end of file + self.emailNotificationsAreWorking = working -- cgit v1.2.3