aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/HTTPServerChecker.py2
-rwxr-xr-xjobs/JobBase.py4
-rwxr-xr-xjobs/PeerChecker.py2
-rwxr-xr-xjobs/TCPServerChecker.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/jobs/HTTPServerChecker.py b/jobs/HTTPServerChecker.py
index 965e977..e590486 100755
--- a/jobs/HTTPServerChecker.py
+++ b/jobs/HTTPServerChecker.py
@@ -14,11 +14,11 @@ class HTTPServerChecker(JobSpawner.JobSpawner):
class ServerChecker(JobBase.JobBase):
def __init__(self, config, url, frequency, failureNotificationFrequency):
- JobBase.JobBase.__init__(self, config, url, frequency, failureNotificationFrequency)
self.config = config
self.url = url
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
+ super(HTTPServerChecker.ServerChecker, self).__init__(config, url, frequency, failureNotificationFrequency)
def getName(self):
return str(self.__class__) + " for " + self.url
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 416f28d..427dd17 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -21,10 +21,10 @@ class JobFailureNotificationFrequency:
EVERYHOUR = "hour"
ONSTATECHANGE = "state_change"
-class JobBase:
+class JobBase(object):
def __init__(self, config, *args):
self.config = config
- self.stateName = hashlib.sha1(self.getName() + "|" + "|".join(args)).hexdigest()
+ self.stateName = hashlib.sha1(self.getName() + "|" + "|".join([str(a) for a in args])).hexdigest()
""" Return a friendly name to identify this Job"""
def getName(self):
diff --git a/jobs/PeerChecker.py b/jobs/PeerChecker.py
index d271419..8d0a6b7 100755
--- a/jobs/PeerChecker.py
+++ b/jobs/PeerChecker.py
@@ -13,9 +13,9 @@ import JobSpawner
class PeerChecker(JobSpawner.JobSpawner):
class IndividualPeerChecker(JobBase.JobBase):
def __init__(self, config, checkurl, notificationAddress):
- JobBase.JobBase.__init__(self, config, checkurl, notificationAddress)
self.checkurl = checkurl
self.notificationAddress = notificationAddress
+ super(PeerChecker.IndividualPeerChecker, self).__init__(config, checkurl, notificationAddress)
def executeEvery(self):
return JobBase.JobFrequency.HOUR
diff --git a/jobs/TCPServerChecker.py b/jobs/TCPServerChecker.py
index bdb914c..eaf6704 100755
--- a/jobs/TCPServerChecker.py
+++ b/jobs/TCPServerChecker.py
@@ -14,13 +14,13 @@ class TCPServerChecker(JobSpawner.JobSpawner):
class ServerChecker(JobBase.JobBase):
def __init__(self, config, ip, port, friendlyName, frequency, failureNotificationFrequency):
- JobBase.JobBase.__init__(self, config, ip, port, friendlyName, frequency, failureNotificationFrequency)
self.config = config
self.ip = ip
self.port = port
self.friendlyName = friendlyName + "(" + self.ip + ":" + str(self.port) + ")"
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
+ super(TCPServerChecker.ServerChecker, self).__init__(config, ip, port, friendlyName, frequency, failureNotificationFrequency)
def getName(self):
return str(self.__class__) + " for " + self.friendlyName