Worker.py 664 B

1234567891011121314151617181920212223242526272829
  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. def stop(self):
  12. self.stopThread = True
  13. def run(self):
  14. counter = 0
  15. while None == self.stopThread:
  16. time.sleep(1)
  17. counter += 1
  18. if 0 != (counter % 60):
  19. continue
  20. # TODO execute planning, etc.
  21. continue