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. --- jobs/PeerChecker.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'jobs') 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." -- cgit v1.2.3