fix reload stuck

This commit is contained in:
yusing
2025-01-02 11:30:09 +08:00
parent 2fe0b888bd
commit cd74b76483
6 changed files with 23 additions and 17 deletions

View File

@@ -46,7 +46,7 @@ func newWaker(parent task.Parent, entry route.Entry, rp *gphttp.ReverseProxy, st
rp: rp,
stream: stream,
}
task := parent.Subtask("idlewatcher")
task := parent.Subtask("idlewatcher." + entry.TargetName())
watcher, err := registerWatcher(task, entry, waker)
if err != nil {
return nil, E.Errorf("register watcher: %w", err)
@@ -117,6 +117,7 @@ func (w *Watcher) Uptime() time.Duration {
return 0
}
// Status implements health.HealthMonitor.
func (w *Watcher) Status() health.Status {
status := w.getStatusUpdateReady()
if w.metric != nil {
@@ -125,7 +126,6 @@ func (w *Watcher) Status() health.Status {
return status
}
// Status implements health.HealthMonitor.
func (w *Watcher) getStatusUpdateReady() health.Status {
if !w.ContainerRunning {
return health.StatusNapping