@blockrun/franklin 3.15.45 → 3.15.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/task.js +12 -1
- package/package.json +1 -1
package/dist/commands/task.js
CHANGED
|
@@ -36,7 +36,18 @@ export function buildTaskCommand() {
|
|
|
36
36
|
}
|
|
37
37
|
const now = Date.now();
|
|
38
38
|
for (const t of tasks) {
|
|
39
|
-
|
|
39
|
+
// For a running task, "age" should mean "how long has this been
|
|
40
|
+
// going" — use startedAt (or createdAt). For a terminal task,
|
|
41
|
+
// "age" should mean "how recently did this end" — use endedAt
|
|
42
|
+
// (or lastEventAt). Verified 2026-05-04 on a real machine: a
|
|
43
|
+
// running ETL that had been chewing through 685k files for
|
|
44
|
+
// 13 minutes was displayed as "0s" because the runner's 5s
|
|
45
|
+
// heartbeat keeps lastEventAt fresh — useless signal.
|
|
46
|
+
const isTerminal = isTerminalTaskStatus(t.status);
|
|
47
|
+
const ageRefMs = isTerminal
|
|
48
|
+
? (t.endedAt ?? t.lastEventAt ?? t.createdAt)
|
|
49
|
+
: (t.startedAt ?? t.createdAt);
|
|
50
|
+
const age = fmtAge(now - ageRefMs);
|
|
40
51
|
console.log(`${t.runId} ${t.status.padEnd(10)} ${age.padStart(5)} ${t.label}`);
|
|
41
52
|
}
|
|
42
53
|
});
|
package/package.json
CHANGED