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 a1848ce
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions ecs-agent/api/container/restart/restart_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,10 @@ 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",
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 {
if time.Since(startTime).Seconds() < float64(rt.RestartPolicy.RestartAttemptPeriod) {
return false, "attempt reset period has not elapsed"
}
return true, ""
Expand Down

0 comments on commit a1848ce

Please sign in to comment.