Skip to content

Commit

Permalink
TEST dbueg lcr again
Browse files Browse the repository at this point in the history
  • Loading branch information
timj-hh committed Jul 2, 2024
1 parent ce27f1f commit e47fbe6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ecs-agent/api/container/restart/restart_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (rt *RestartTracker) ShouldRestart(exitCode *int, startedAt time.Time,
startTime := startedAt
if !rt.LastRestartAt.IsZero() {
logger.Info("HELLO WORLD")
fmt.Println("HELLO WORLD 2")
startTime = rt.LastRestartAt
}
logger.Info("HELLO WORLD",
Expand All @@ -102,6 +103,14 @@ func (rt *RestartTracker) ShouldRestart(exitCode *int, startedAt time.Time,
"ResetAttemptPeriod": time.Duration(rt.RestartPolicy.RestartAttemptPeriod),
"IntAttemptPeriod": rt.RestartPolicy.RestartAttemptPeriod,
})
fmt.Println("HELLO WORLD 2",
logger.Fields{
"HasElapsed": time.Since(startTime) < time.Duration(rt.RestartPolicy.RestartAttemptPeriod)*time.Second,
"TimeSince": time.Since(startTime),
"AttemptPeriodSeconds": time.Duration(rt.RestartPolicy.RestartAttemptPeriod) * time.Second,
"ResetAttemptPeriod": time.Duration(rt.RestartPolicy.RestartAttemptPeriod),
"IntAttemptPeriod": rt.RestartPolicy.RestartAttemptPeriod,
})
if time.Since(startTime) < time.Duration(rt.RestartPolicy.RestartAttemptPeriod)*time.Second {
return false, "attempt reset period has not elapsed"
}
Expand Down

0 comments on commit e47fbe6

Please sign in to comment.