From 508224494997cfe9d7c13a75fc1332a1d9b4619b Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sun, 8 Dec 2019 00:32:39 +0100 Subject: [PATCH] Gather stale backup process containers --- src/restic_compose_backup/containers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/restic_compose_backup/containers.py b/src/restic_compose_backup/containers.py index 372e6e4..b29cbed 100644 --- a/src/restic_compose_backup/containers.py +++ b/src/restic_compose_backup/containers.py @@ -330,6 +330,12 @@ class RunningContainers: for container_data in all_containers: container = Container(container_data) + # Gather stale backup process containers + if (self.this_container.image == container.image + and not container.is_running + and container.is_backup_process_container): + self.stale_backup_process_containers.append(container) + # We only care about running containers if not container.is_running: continue