优化启动超时逻辑,log抓出来了
This commit is contained in:
@@ -858,9 +858,10 @@ func (pm *ProcessManager) computeState(pid int, result PortCheckResult) ProcessS
|
|||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 启动超时
|
// 3. 启动超时(只对 STARTING 状态生效)
|
||||||
if time.Since(pm.startTime) > StartupTimeout && pm.currentPhase != PhaseReloading {
|
if pm.currentPhase == PhaseStarting && time.Since(pm.startTime) > StartupTimeout {
|
||||||
log.Printf("[DEBUG] computeState: 启动超时, startTime=%v, elapsed=%v", pm.startTime, time.Since(pm.startTime))
|
log.Printf("[DEBUG] computeState: 启动超时, startTime=%v, elapsed=%v",
|
||||||
|
pm.startTime, time.Since(pm.startTime))
|
||||||
state.Error = fmt.Sprintf("启动超时 (超过 %v)", StartupTimeout)
|
state.Error = fmt.Sprintf("启动超时 (超过 %v)", StartupTimeout)
|
||||||
if portErr != nil {
|
if portErr != nil {
|
||||||
state.Error += ": " + portErr.Error()
|
state.Error += ": " + portErr.Error()
|
||||||
|
|||||||
Reference in New Issue
Block a user