Skip to content

Commit e416d32

Browse files
committed
Check only running containers
1 parent eac6526 commit e416d32

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.defaultInterpreterPath": ".\/.venv\/Scripts\/python.exe"
3+
}

main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
while True:
2828
containers = docker_client.containers.list(
2929
filters = {
30+
"status": "running",
3031
"label": settings.LABEL_PREFIX + "enable=true"
3132
}
3233
)
@@ -54,7 +55,7 @@
5455
logging.debug("Compressing backup")
5556

5657
if database.type == DatabaseType.unknown:
57-
logging.info("Cannot read database type. Please specify via label.")
58+
logging.error("FAILED: Cannot read database type. Please specify via label.")
5859

5960
network.connect(container, aliases = ["database-backup-target"])
6061
outFile = "/dump/{}.sql".format(container.name)

0 commit comments

Comments
 (0)