MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / nextInstancePollDelay

Function nextInstancePollDelay

tui/status.go:126–139  ·  view source on GitHub ↗
(transitionAge time.Duration)

Source from the content-addressed store, hash-verified

124}
125
126func nextInstancePollDelay(transitionAge time.Duration) time.Duration {
127 switch {
128 case transitionAge < 2*time.Minute:
129 return 1 * time.Second
130 case transitionAge < 10*time.Minute:
131 return 10 * time.Second
132 case transitionAge < time.Hour:
133 return 30 * time.Second
134 case transitionAge < 2*time.Hour:
135 return 60 * time.Second
136 default:
137 return 5 * time.Minute
138 }
139}
140
141func nextEmptyPollDelay(emptyStartedAt time.Time) time.Duration {
142 if emptyStartedAt.IsZero() || time.Since(emptyStartedAt) < emptyPollBackoffAfter {

Callers 1

nextStatusPollDelayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected