No need to filter containers here

This commit is contained in:
2024-07-08 07:18:27 -03:00
parent 7104403585
commit 379b4e2472
3 changed files with 11 additions and 2 deletions

View File

@ -99,7 +99,8 @@ module Funko
sleep 0.1.seconds
}
else
containers.select { |container| container.@state == "running" }.sort! { |i, j|
# Sort them older to newer, so we stop the oldest
containers.sort! { |i, j|
i.@created <=> j.@created
}.each { |container|
Log.info { "Removing instance" }