mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-24 21:20:42 +00:00
fix formatting of exclude_container_labels
This commit is contained in:
parent
e3a26d0874
commit
50fa054709
@ -1 +1,3 @@
|
||||
* Initial release after fork
|
||||
* BUGFIX
|
||||
* fix timedelta validation for env vars
|
||||
* fix formatting of `exclude_container_labels`
|
||||
|
@ -278,7 +278,7 @@ class GarbageCollector:
|
||||
config = self.config.config
|
||||
exclude_labels = []
|
||||
|
||||
for exclude_label_arg in config["gc"]["exclude_container_label"]:
|
||||
for exclude_label_arg in config["gc"]["exclude_container_labels"]:
|
||||
split_exclude_label = exclude_label_arg.split("=", 1)
|
||||
exclude_label_key = split_exclude_label[0]
|
||||
if len(split_exclude_label) == 2:
|
||||
@ -291,7 +291,7 @@ class GarbageCollector:
|
||||
value=exclude_label_value,
|
||||
)
|
||||
)
|
||||
return exclude_labels
|
||||
config["gc"]["exclude_container_labels"] = exclude_labels
|
||||
|
||||
def _get_docker_client(self):
|
||||
config = self.config.config
|
||||
@ -304,6 +304,7 @@ class GarbageCollector:
|
||||
"""Garbage collector main method."""
|
||||
self.logger.info("Start garbage collection")
|
||||
config = self.config.config
|
||||
self._format_exclude_labels()
|
||||
|
||||
if config["gc"]["max_container_age"]:
|
||||
self.cleanup_containers()
|
||||
|
Loading…
Reference in New Issue
Block a user