Always stop pod
This commit is contained in:
parent
fd60cef69b
commit
cd06cc445e
2
main.py
2
main.py
|
@ -53,6 +53,7 @@ class PodKeeper:
|
|||
last_check = datetime.utcnow()
|
||||
print(f"Starting pod {self.podname} at {last_check}", file=sys.stderr, flush=True)
|
||||
podman.play.kube(self.podyaml, *self.podnet_args)
|
||||
try:
|
||||
sdnotify("--ready")
|
||||
while not self.stopping.is_set():
|
||||
self.waiter.wait()
|
||||
|
@ -77,6 +78,7 @@ class PodKeeper:
|
|||
print("Error reloading pod", file=sys.stderr, flush=True)
|
||||
traceback.print_exc()
|
||||
|
||||
finally:
|
||||
self.stop_sequence()
|
||||
|
||||
def stop_sequence(self):
|
||||
|
|
Loading…
Reference in a new issue