fix(presence): list only running agents; a finished task's agent is not stale
deploy / plan (push) Failing after 1s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped

This commit is contained in:
sam committed 2026-11-09 01:53:42 +11:00
1 parent 45b368af2e
commit d1b1bac4fb
2 files changed
+5 -5

No files matched your search

+3 -2
View File
@@ -139,10 +139,11 @@ func Mesh(records []storecontract.Presence, now time.Time) []Service {
if record.Service != Agent {
continue
}
// An agent reports for one task and stops when the task ends, so a
// silent agent is finished, not failed: only running agents are listed.
worker := Service{Presence: record, State: state(record, true, now)}
if worker.State == StateDown {
worker.Detail = ""
worker.Checks = nil
continue
}
workers = append(workers, worker)
}