diff --git a/lib/core/command.py b/lib/core/command.py index a9b8f62..e851038 100644 --- a/lib/core/command.py +++ b/lib/core/command.py @@ -3,6 +3,7 @@ from subprocess import Popen from subprocess import CalledProcessError from datetime import datetime as dt +#TODO: Move this to shell.py service file. this definitely is shell execution. (hanez) class Command: def __init__(self, command, log): diff --git a/lib/core/job.py b/lib/core/job.py index bf4a474..b2fcb0c 100644 --- a/lib/core/job.py +++ b/lib/core/job.py @@ -39,10 +39,10 @@ class Job: self.jobThreshold += 1 if self.jobThreshold >= serviceThreshold: - self.log.d("ARGGHHH!!") - self.handle_alarm(self.jobThreshold-serviceThreshold) + self.log.d("Threshold reached!") + self.handle_alarm(self.jobThreshold - serviceThreshold) - def handle_alarm(self, threholdOffset): + def handle_alarm(self, thresholdOffset): pass def handle_call(self): diff --git a/lib/core/linspector_daemon.py b/lib/core/linspector_daemon.py index b55ab19..cfdd8c4 100644 --- a/lib/core/linspector_daemon.py +++ b/lib/core/linspector_daemon.py @@ -1,6 +1,13 @@ from ..core import logger from ..core.daemon import Daemon +""" +TODO: Think about, that daemonizing this software is not our goal but when we want to that, this needs a rewrite and +should maybe move over to the daemon frontend. daemon.py will remain the the base for this and should stay in lib/core . +Since a daemon it normally not a frontend we should think about how to handle this. When daemonizing a real frontend +like "Lish" will make no sense but a frontend like "https" or "xmpp" could be useful anyway... +""" + class LinspectorDaemon(Daemon): def run(self): diff --git a/lib/services/service.py b/lib/services/service.py index da60a45..d1540e4 100644 --- a/lib/services/service.py +++ b/lib/services/service.py @@ -16,7 +16,6 @@ class Service(object): elif self.needs_arguments(): raise Exception("Error: needs arguments but none provided!") - self._parser = [] if KEY_PARSER in kwargs: self.add_parser(kwargs[KEY_PARSER]) @@ -36,9 +35,7 @@ class Service(object): self._periods = [] if KEY_PERIODS in kwargs: self.add_periods(kwargs[KEY_PERIODS]) - - def add_arguments(self, args): for key, val in args.items(): self._args[key] = val