Skip to content

Commit

Permalink
terminate kubernetes watch in case of unknown error (#43645)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavansharma36 authored Nov 12, 2024
1 parent d8bd999 commit ac4dec1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,13 @@ def end(self) -> None:
self.result_queue.join()
except ConnectionResetError:
self.log.exception("Connection Reset error while flushing task_queue and result_queue.")
except Exception:
self.log.exception("Unknown error while flushing task queue and result queue.")
if self.kube_scheduler:
self.kube_scheduler.terminate()
try:
self.kube_scheduler.terminate()
except Exception:
self.log.exception("Unknown error while flushing task queue and result queue.")
self._manager.shutdown()

def terminate(self):
Expand Down

0 comments on commit ac4dec1

Please sign in to comment.