mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
feat(cloud): Kill containers before removing them for faster destruction
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
903b3d25a8
commit
75c7e3fd84
1 changed files with 8 additions and 0 deletions
|
|
@ -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('/'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue