From aaa37a5f62b2873cdc99156e0d3ae69f50621782 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 2 Sep 2021 21:01:00 +0200 Subject: [PATCH] execute the planner every minute --- aman/sys/Worker.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aman/sys/Worker.py b/aman/sys/Worker.py index 83c33fe..4af535b 100644 --- a/aman/sys/Worker.py +++ b/aman/sys/Worker.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import threading +import time from aman.config.Airport import Airport @@ -16,6 +17,13 @@ class Worker(threading.Thread): self.stopThread = True def run(self): + counter = 0 + while None == self.stopThread: + time.sleep(1) + counter += 1 + if 0 != (counter % 60): + continue + # TODO execute planning, etc. continue