Skip to content

Commit

Permalink
terminate kubernetes watch in case of unknown error (apache#43645)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavansharma36 authored and sunank200 committed Nov 12, 2024
1 parent 0a49acd commit bb12e6b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,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 bb12e6b

Please sign in to comment.