Skip to content

Commit

Permalink
Changed default value of the startInterval to 5s
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Walker <90711509+j2walker@users.noreply.github.com>
  • Loading branch information
j2walker committed May 5, 2024
1 parent ac71ac1 commit e7fe35c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion daemon/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const (
// Also the time before the first probe.
defaultProbeInterval = 30 * time.Second

// Default interval between the container starting and the first probe run.
defaultStartInverval = 5 * time.Second

// The maximum length of time a single probe run should take. If the probe takes longer
// than this, the check is considered to have failed.
defaultProbeTimeout = 30 * time.Second
Expand Down Expand Up @@ -251,7 +254,7 @@ func handleProbeResult(d *Daemon, c *container.Container, result *types.Healthch
// There is never more than one monitor thread running per container at a time.
func monitor(d *Daemon, c *container.Container, stop chan struct{}, probe probe) {
probeInterval := timeoutWithDefault(c.Config.Healthcheck.Interval, defaultProbeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, probeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, defaultStartInverval)
startPeriod := timeoutWithDefault(c.Config.Healthcheck.StartPeriod, defaultStartPeriod)

c.Lock()
Expand Down

0 comments on commit e7fe35c

Please sign in to comment.