Merge pull request #60 from RuoJi6/fix/task-runtime-exclude-pause

fix: 运行时长排除暂停时间
This commit is contained in:
RuoJi6 authored and GitHub committed 2026-10-27 00:44:03 -07:00
commit cb0a69ef60
16 files changed
+587 -88

No files matched your search

+1 -1
View File
@@ -1138,7 +1138,7 @@ func (s *Server) listTasks(w http.ResponseWriter, r *http.Request) {
metric := metrics[t.ExpID]
dto.Tokens = tokenTotalDTO(metric.Tokens)
// prefer the live in-memory heartbeat (fresher) and fall back to the
// persisted max activity time (survives restarts) for run-duration display.
// persisted max activity time (survives restarts) for activity display.
dto.LastActivity = metric.LastActivity
if live := s.engine.LastActivity(t.ID); live > dto.LastActivity {
dto.LastActivity = live