aboutsummaryrefslogtreecommitdiff
path: root/servers.py
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-01-26 01:15:03 -0500
committerTom Ritter <tom@ritter.vg>2016-01-26 01:15:03 -0500
commit869de79cc6483f5583b2f9bddd08720d103c8bec (patch)
tree1d548222a4b8d142ff821898df59786c24b176ae /servers.py
parent19341244fb0a313a1743cbae9c3dc5cbbcd3ddb0 (diff)
Differentiating between a mail problem and jobs not being run.
Diffstat (limited to 'servers.py')
-rwxr-xr-xservers.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/servers.py b/servers.py
index 207d4f1..d2d7a50 100755
--- a/servers.py
+++ b/servers.py
@@ -11,12 +11,15 @@ class StatusSite(resource.Resource):
resource.Resource.__init__(self)
self.statusTracker = statusTracker
def render_GET(self, request):
- if self.statusTracker.isAllGood():
+ if self.statusTracker.isMailGood() and self.statusTracker.isJobsGood():
logging.debug("Indicating that everything seems to be okay")
s = "True"
- else:
- logging.warn("Indicating that everything does not seem to be okay")
- s = "False"
+ elif not self.statusTracker.isMailGood():
+ logging.warn("Indicating that we have a problem with Mail")
+ s = "MailProblem"
+ elif not self.statusTracker.isJobsGood():
+ logging.warn("Indicating that we have a problem with Jobs")
+ s = "JobProblem"
request.setResponseCode(200)
return s