1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

feat(cloud): Kill containers before removing them for faster destruction

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2026-03-05 15:32:11 +01:00 committed by Robin Appelman
commit 862d33b017

View file

@ -499,6 +499,14 @@ impl Cloud {
pub async fn destroy(self, docker: &Docker) -> Result<()> {
for container in self.containers {
docker
.kill_container(
container.trim_start_matches('/'),
None,
)
.await
.into_diagnostic()
.wrap_err("Failed to kill container")?;
docker
.remove_container(
container.trim_start_matches('/'),