aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xjobs/HTTPServerChecker.py2
-rwxr-xr-xjobs/TCPServerChecker.py2
-rwxr-xr-xjobs/TLSCertExpiration.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3be415d..a64837c 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ JobBase is the base for a job, and should be used when you have a single, custom
JobSpawner should be used when you want to run the same logic for multiple servers. Look at HTTPServerChecker and TCPServerChecker for examples of how one can use it.
-Be sure to call JobBase.__init__(self, config, ...) in the inner JobBase's init (with all of your arguements); otherwise the job state file will get messed up and be unable to distinguish between your individual spawned jobs.
+Be sure to call JobBase.__init__(self, config, ...) in the inner JobBase's init. It should be passed all the arguments that distinguish one job from another - for example for the TCP checker this is the IP and port. If you omit this step, the job state file will get messed up and be unable to distinguish between your individual spawned jobs. (It does not need 'extra' configuration arguments that do not distinguish jobs such as JobFrequency. If you pass them anyway, you will get extra lines in the state file when/if you change those arguments which is not bad, just a little messy.)
# Install
diff --git a/jobs/HTTPServerChecker.py b/jobs/HTTPServerChecker.py
index 8f0e88f..621e7b8 100755
--- a/jobs/HTTPServerChecker.py
+++ b/jobs/HTTPServerChecker.py
@@ -19,7 +19,7 @@ class HTTPServerChecker(JobSpawner.JobSpawner):
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
self.failuresBeforeNotification = failuresBeforeNotification
- super(HTTPServerChecker.ServerChecker, self).__init__(config, url, frequency, failureNotificationFrequency, failuresBeforeNotification)
+ super(HTTPServerChecker.ServerChecker, self).__init__(config, url)
def getName(self):
return str(self.__class__) + " for " + self.url
diff --git a/jobs/TCPServerChecker.py b/jobs/TCPServerChecker.py
index d02cb58..7daf7f5 100755
--- a/jobs/TCPServerChecker.py
+++ b/jobs/TCPServerChecker.py
@@ -21,7 +21,7 @@ class TCPServerChecker(JobSpawner.JobSpawner):
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
self.failuresBeforeNotification = failuresBeforeNotification
- super(TCPServerChecker.ServerChecker, self).__init__(config, ip, port, friendlyName, frequency, failureNotificationFrequency, failuresBeforeNotification)
+ super(TCPServerChecker.ServerChecker, self).__init__(config, ip, port)
def getName(self):
return str(self.__class__) + " for " + self.friendlyName
diff --git a/jobs/TLSCertExpiration.py b/jobs/TLSCertExpiration.py
index d5cfa48..e4b05b7 100755
--- a/jobs/TLSCertExpiration.py
+++ b/jobs/TLSCertExpiration.py
@@ -22,7 +22,7 @@ class TLSCertExpiration(JobSpawner.JobSpawner):
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
self.failuresBeforeNotification = failuresBeforeNotification
- super(TLSCertExpiration.CertChecker, self).__init__(config, url, frequency, failureNotificationFrequency, failuresBeforeNotification)
+ super(TLSCertExpiration.CertChecker, self).__init__(config, url)
def getName(self):
return str(self.__class__) + " for " + self.url