mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 21:11:50 +08:00
fix: exclude pause time from task run duration
Persist active_run_seconds + run_segment_started_at so task list and orchestration list_tasks accumulate only actual execution time across pause/resume/queue/terminal transitions.
This commit is contained in:
1 parent
e740334b90
commit
41c967f7ad
15 files changed
+320
-71
No files matched your search
+1
-1
@@ -1136,7 +1136,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
|
||||
|
||||
Reference in new issue
Block a user