Skip to content

Commit

Permalink
Merge pull request #258 from ekristen/run-sleep-flag
Browse files Browse the repository at this point in the history
feat(run): add flag to control the run loop sleep delay
  • Loading branch information
ekristen authored Aug 31, 2024
2 parents bd7ff3e + 8a443a5 commit 8d11cbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/commands/nuke/nuke.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func execute(c *cli.Context) error { //nolint:funlen,gocyclo
// Instantiate libnuke
n := libnuke.New(params, filters, parsedConfig.Settings)

n.SetRunSleep(5 * time.Second)
n.SetRunSleep(c.Duration("run-sleep-delay"))
n.SetLogger(logrus.WithField("component", "libnuke"))
n.RegisterVersion(fmt.Sprintf("> %s", common.AppVersion.String()))

Expand Down Expand Up @@ -251,6 +251,12 @@ func init() { //nolint:funlen
Name: "max-wait-retries",
Usage: "maximum number of retries to wait for dependencies to be removed",
},
&cli.DurationFlag{
Name: "run-sleep-delay",
EnvVars: []string{"AWS_NUKE_RUN_SLEEP_DELAY"},
Usage: "time to sleep between run/loops of resource deletions, default is 5 seconds",
Value: 5 * time.Second,
},
&cli.BoolFlag{
Name: "no-alias-check",
Usage: "disable aws account alias check - requires entry in config as well",
Expand Down

0 comments on commit 8d11cbd

Please sign in to comment.