diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ea872fb..6672172 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.5 +current_version = 0.1.4 commit = True tag = True diff --git a/setup.py b/setup.py index f5c62d6..6924516 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('README.rst') as f: setuptools.setup( name='TSGRain Controller', - version='0.1.5', + version='0.1.4', author='ThetaDev', description='TSGRain irrigation controller', long_description=README, diff --git a/tsgrain_controller/__init__.py b/tsgrain_controller/__init__.py index 66a87bb..7525d19 100644 --- a/tsgrain_controller/__init__.py +++ b/tsgrain_controller/__init__.py @@ -1 +1 @@ -__version__ = '0.1.5' +__version__ = '0.1.4' diff --git a/tsgrain_controller/application.py b/tsgrain_controller/application.py index 5239347..558d580 100644 --- a/tsgrain_controller/application.py +++ b/tsgrain_controller/application.py @@ -176,7 +176,6 @@ class Application(models.AppInterface): systimecfg.set_system_timezone(tz, self.cfg.cmd_set_timezone) def start(self): - """Starte die Anwendung""" logging.info('Starting application') self._running = True self.io.start() @@ -186,7 +185,6 @@ class Application(models.AppInterface): self.grpc_server.start() def stop(self): - """Stoppe die Anwendung""" logging.info('Stopping application') self._running = False self.grpc_server.stop(None) diff --git a/tsgrain_controller/models.py b/tsgrain_controller/models.py index 71627cf..360f47a 100644 --- a/tsgrain_controller/models.py +++ b/tsgrain_controller/models.py @@ -51,10 +51,10 @@ class Job: and date_now.minute == self.date.minute return date_now.year == self.date.year \ - and date_now.month == self.date.month \ - and date_now.day == self.date.day \ - and date_now.hour == self.date.hour \ - and date_now.minute == self.date.minute + and date_now.month == self.date.month \ + and date_now.day == self.date.day \ + and date_now.hour == self.date.hour \ + and date_now.minute == self.date.minute def serialize(self) -> Dict[str, Any]: return { @@ -96,10 +96,6 @@ class Job: ) def validate(self, app: 'AppInterface'): - """ - Prüfe, ob der Task gültige Daten enthält - (Zonen existieren, Bewässerungszeit > 0) - """ if not self.zones: raise util.InvalidInputException('No zones set') if self.duration < 1: @@ -313,7 +309,7 @@ class AppInterface: :param request: Objekt, dass die Parameter der neuen Aufgabe enthält. :return: Statusobjekt (Information, ob eine Aufgabe gestartet oder gestoppt - wurde). + wurde). """ def start_task(self, source: Source, zone_id: int, duration: int, @@ -325,7 +321,7 @@ class AppInterface: :param zone_id: ID der Bewässerungszone :param duration: Bewässerungsdauer in Sekunden (0 für Standarddauer) :param queuing: Neue Aufgabe in die Warteschlange einreihen, wenn momentan - eine andere Zone bewässert wird. + eine andere Zone bewässert wird. :return: True wenn die Aufgabe erfolgreich gestartet wurde """ diff --git a/tsgrain_controller/util.py b/tsgrain_controller/util.py index 5e04804..bb63b9a 100644 --- a/tsgrain_controller/util.py +++ b/tsgrain_controller/util.py @@ -129,20 +129,9 @@ class StoppableThread(threading.Thread): pass def run_cycle(self): - """ - Führe einen Durchlauf des Threads aus. - - Diese Funktion darf nicht blockieren, sonst kann der - Thread nicht gestoppt werden. - """ + pass def run(self): - """ - Führe die ``run_cycle()``-Funktion in - Endlosschleife aus, mit einer durch das - ``interval``-Attribut bestimmten Verzögerung zwischen - den Durchläufen. - """ try: self.setup() @@ -157,10 +146,6 @@ class StoppableThread(threading.Thread): sys.excepthook(*sys.exc_info()) def stop(self): - """ - Stoppe den Thread und warte bis er beendet. Dies dauert - maximal ``interval`` + Durchlaufzeit von ``run_cycle()``. - """ self._stop_signal.set() try: self.join()