fix removal of second thread

This commit is contained in:
Aaron Riedel 2024-12-22 19:02:34 +01:00
parent 131a1f4106
commit 27e0326727
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -151,12 +151,6 @@ def main():
th1 = threading.Thread(target=watch_crd, args=("traefik.io", "v1alpha1", "ingressroutes"), daemon=True) th1 = threading.Thread(target=watch_crd, args=("traefik.io", "v1alpha1", "ingressroutes"), daemon=True)
th1.start() th1.start()
# wait for threads to finish
while th1.is_alive() and th2.is_alive():
th1.join(0.1)
th2.join(0.1)
logging.info(f"One of the threads exited {th1.is_alive()}, {th2.is_alive()}")
if __name__ == '__main__': if __name__ == '__main__':
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)