From f5a2b4c6c84ac9598cc04e76da2729495d6b711a Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Fri, 21 Nov 2025 03:33:05 -0500 Subject: [PATCH] clean up logging --- scripts/deploy_containers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/deploy_containers.py b/scripts/deploy_containers.py index e34de6d..cd8f334 100644 --- a/scripts/deploy_containers.py +++ b/scripts/deploy_containers.py @@ -21,9 +21,9 @@ def deploy(tag = None, host = None): command = construct_command(tag, host) if tag: - print(f"Deploying {tag}...\n") + print(f"[MAIN] Deploying {tag}...") else: - print(f"Deploying {host}...\n") + print(f"[MAIN] Deploying host {host}...") res = subprocess.run(command, shell=True, stdout=subprocess.DEVNULL) return res.returncode == 0 @@ -75,6 +75,8 @@ def main(): deployed = [] failed = [] + + print("\n") for task in new_diff: deployment = deploy(tag=task) @@ -82,7 +84,9 @@ def main(): failed.append(task) else: deployed.append(task) + print("\n") + print("\n") for task in removed_containers: print(f"[MAIN] Attempting to remove containers related to '{task}'...") task_name = task.split("/")[1].split(".")[0] @@ -98,6 +102,7 @@ def main(): subprocess.run(f"/usr/bin/docker container rm {docker_container_id}", shell=True, stdout=subprocess.DEVNULL) subprocess.run("/usr/bin/docker image prune -f", shell=True, stdout=subprocess.DEVNULL) subprocess.run("/usr/bin/docker container prune -f", shell=True, stdout=subprocess.DEVNULL) + print("\n") if len(failed) <= 0 and len(deployed) > 0: print("\n---------------------")