Skip to content

Commit

Permalink
Lower minimum task clean up duration from one minute to one second
Browse files Browse the repository at this point in the history
  • Loading branch information
angelcar committed Nov 13, 2021
1 parent 4965b57 commit 1f0485b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const (

// minimumTaskCleanupWaitDuration specifies the minimum duration to wait before cleaning up
// a task's container. This is used to enforce sane values for the config.TaskCleanupWaitDuration field.
minimumTaskCleanupWaitDuration = 1 * time.Minute
minimumTaskCleanupWaitDuration = time.Second

// minimumImagePullInactivityTimeout specifies the minimum amount of time for that an image can be
// 'stuck' in the pull / unpack step. Very small values are unsafe and lead to high failure rate.
Expand Down
2 changes: 1 addition & 1 deletion agent/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func TestValidFormatParseEnvVariableDuration(t *testing.T) {

func TestInvalidTaskCleanupTimeoutOverridesToThreeHours(t *testing.T) {
defer setTestRegion()()
setTestEnv("ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION", "1s")
setTestEnv("ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION", "1ms")
cfg, err := NewConfig(ec2.NewBlackholeEC2MetadataClient())
assert.NoError(t, err)

Expand Down

0 comments on commit 1f0485b

Please sign in to comment.