aboutsummaryrefslogtreecommitdiff
path: root/jobs
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 /jobs
parent19341244fb0a313a1743cbae9c3dc5cbbcd3ddb0 (diff)
Differentiating between a mail problem and jobs not being run.
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/PeerChecker.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/jobs/PeerChecker.py b/jobs/PeerChecker.py
index 965f4a4..f17da53 100755
--- a/jobs/PeerChecker.py
+++ b/jobs/PeerChecker.py
@@ -31,10 +31,18 @@ class PeerChecker(JobBase.JobBase):
else:
if "True" in response.content:
peerOK = True
- elif "False" in response.content:
+ elif "MailProblem" in response.content:
peerOK = False
subject = peer[0] + " reports it cannot send email."
body = str(response.status_code) + "\n" + response.content
+ elif "JobProblem" in response.content:
+ peerOK = False
+ subject = peer[0] + " reports its jobs are not running."
+ body = str(response.status_code) + "\n" + response.content
+ else:
+ peerOK = False
+ subject = peer[0] + " had an unexpected response."
+ body = str(response.status_code) + "\n" + response.content
except Exception as e:
peerOK = False
subject = peer[0] + " is not responding."