Worker.py 730 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. import threading
  3. import time
  4. from aman.config.Airport import Airport
  5. class Worker(threading.Thread):
  6. def __init__(self, icao : str, configuration : Airport):
  7. threading.Thread.__init__(self)
  8. self.stopThread = None
  9. self.icao = icao
  10. self.configuration = configuration
  11. self.arrivalRoutes = configuration.gngData.arrivalRoutes
  12. def stop(self):
  13. self.stopThread = True
  14. def run(self):
  15. counter = 0
  16. while None == self.stopThread:
  17. time.sleep(1)
  18. counter += 1
  19. if 0 != (counter % 60):
  20. continue
  21. # TODO execute planning, etc.
  22. continue