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 c089a39
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ecs-agent/api/container/restart/restart_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,18 @@ 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",
rsn := fmt.Sprintf("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,
})
fmt.Println("HELLO WORLD 2",
logger.Fields{
"HasElapsed": time.Since(startTime) < time.Duration(rt.RestartPolicy.RestartAttemptPeriod)*time.Second,
"TimeSince": time.Since(startTime),
Expand All @@ -105,5 +114,5 @@ func (rt *RestartTracker) ShouldRestart(exitCode *int, startedAt time.Time,
if time.Since(startTime) < time.Duration(rt.RestartPolicy.RestartAttemptPeriod)*time.Second {
return false, "attempt reset period has not elapsed"
}
return true, ""
return true, rsn
}

0 comments on commit c089a39

Please sign in to comment.