From 194a7197e6d27da42f0d44193d1fdf1cc3448cba Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Thu, 19 Sep 2013 21:28:56 +0200 Subject: [PATCH] just cleanups --- examples/hanez.json | 4 ++-- lib/config/config.py | 12 +++++------- lib/core/job.py | 2 -- lib/tasks/jabber.py | 2 +- lib/tasks/mail.py | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/examples/hanez.json b/examples/hanez.json index 7efb11f..80b5db1 100644 --- a/examples/hanez.json +++ b/examples/hanez.json @@ -8,7 +8,7 @@ } }, "periods": { - "always": { "seconds": 2 } + "always": { "seconds": 60 } }, "hostgroups":{ "servers":{ @@ -19,7 +19,7 @@ "class": "tcpconnect", "args": { "port": 80 }, "periods": ["always"], - "threshold": 2 + "threshold": 5 } ] } diff --git a/lib/config/config.py b/lib/config/config.py index 8dd6c40..0ea9beb 100644 --- a/lib/config/config.py +++ b/lib/config/config.py @@ -1,4 +1,7 @@ -__author__ = 'rafael' +""" +The LinspectorConfig class. +""" + class LinspectorConfig(object): def __init__(self): @@ -50,9 +53,4 @@ class LinspectorConfig(object): return self._get_by_name(self.get_members(), name) def get_period_by_name(self, name): - return self._get_by_name(self.get_periods(), name) - - - - - + return self._get_by_name(self.get_periods(), name) \ No newline at end of file diff --git a/lib/core/job.py b/lib/core/job.py index 8237e1a..2d08c4c 100644 --- a/lib/core/job.py +++ b/lib/core/job.py @@ -45,9 +45,7 @@ class Job: def handle_alarm(self, thresholdOffset): for member in self.service.get_hostgroup().get_members(): for task in member.get_tasks(): - print(task) task.execute("Task executed for host: " + self.host) - pass def handle_call(self): self.log.d("handle call") diff --git a/lib/tasks/jabber.py b/lib/tasks/jabber.py index 2699d4a..fbee02d 100644 --- a/lib/tasks/jabber.py +++ b/lib/tasks/jabber.py @@ -1,5 +1,5 @@ """ -The Jabber task. +The Jabber (XMPP) task. Uses: http://xmpppy.sourceforge.net/ """ diff --git a/lib/tasks/mail.py b/lib/tasks/mail.py index 086ba01..c03114d 100644 --- a/lib/tasks/mail.py +++ b/lib/tasks/mail.py @@ -1,5 +1,5 @@ """ -The email task. +The mail task. http://docs.python.org/2/library/email-examples.html """