MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / IsRunnerDefunct

Method IsRunnerDefunct

pkg/controller/rtctrl/runtimeinfo.go:146–169  ·  view source on GitHub ↗

IsRunnerDefunct

(deadline time.Time)

Source from the content-addressed store, hash-verified

144
145// IsRunnerDefunct
146func (info *RuntimeInfo) IsRunnerDefunct(deadline time.Time) bool {
147 if !info.LastLivenessTime.Before(deadline) {
148 return false
149 }
150
151 switch {
152 case info.Abnormal:
153 return true
154
155 case info.State == RuntimeStateWarmUp:
156 return true
157
158 case info.State == RuntimeStateStopping:
159 return true
160
161 case info.State == RuntimeStateStopped:
162 return true
163
164 case info.State == RuntimeStateClosed:
165 return true
166 }
167
168 return false
169}

Callers 2

opResetCheckMethod · 0.95

Calls

no outgoing calls

Tested by 1