From 5b3b02980cf40467160d30e0b9455716bc282da3 Mon Sep 17 00:00:00 2001 From: Gentile G Date: Fri, 1 Dec 2023 17:18:53 +0100 Subject: [PATCH] Adding logs in the process --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index aad88b4..3b46d3e 100644 --- a/main.py +++ b/main.py @@ -110,9 +110,12 @@ if __name__ == '__main__': an_image_was_updated = False for c in containers: this_image_was_updated = client.update_image(endpoint, c['Image']) - an_image_was_updated = an_image_was_updated or this_image_was_updated + if this_image_was_updated: + print(f"{c['Image']} was updated") + an_image_was_updated = True if an_image_was_updated: + print(f"Restarting {stack_name}") if endpoint == 2 and stack_name in ('portainer', 'traefik'): update_local_stack(stack) else: