MCPcopy Index your code
hub / github.com/docker/docker-agent / getEffectiveCooldown

Function getEffectiveCooldown

pkg/runtime/fallback.go:120–126  ·  view source on GitHub ↗

getEffectiveCooldown returns the cooldown duration to use for an agent. Uses the agent's configured cooldown, or the default if not set.

(a *agent.Agent)

Source from the content-addressed store, hash-verified

118// getEffectiveCooldown returns the cooldown duration to use for an agent.
119// Uses the agent's configured cooldown, or the default if not set.
120func getEffectiveCooldown(a *agent.Agent) time.Duration {
121 cooldown := a.FallbackCooldown()
122 if cooldown == 0 {
123 return modelerrors.DefaultCooldown
124 }
125 return cooldown
126}
127
128// getEffectiveRetries returns the number of retries to use for the agent.
129// If no retries are explicitly configured (retries == 0), returns

Callers 2

TestGetEffectiveCooldownFunction · 0.85
recordSuccessMethod · 0.85

Calls 1

FallbackCooldownMethod · 0.80

Tested by 1

TestGetEffectiveCooldownFunction · 0.68