forked from toolshed/abra
feat: add retries to app volume remove
This commit is contained in:
@ -2,6 +2,7 @@ package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -131,12 +132,12 @@ Passing "--force/-f" will select all volumes for removal. Be careful.
|
||||
}
|
||||
|
||||
if len(volumesToRemove) > 0 {
|
||||
err = client.RemoveVolumes(cl, context.Background(), app.Server, volumesToRemove, internal.Force)
|
||||
err := client.RemoveVolumes(cl, context.Background(), volumesToRemove, internal.Force, 5)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
log.Fatalf("removing volumes failed: %s", err)
|
||||
}
|
||||
|
||||
logrus.Info("volumes removed successfully")
|
||||
logrus.Infof("%d volumes removed successfully", len(volumesToRemove))
|
||||
} else {
|
||||
logrus.Info("no volumes removed")
|
||||
}
|
||||
|
Reference in New Issue
Block a user