Skip to content

Commit 0e12d26

Browse files
committed
print seconds since started worker
1 parent f264765 commit 0e12d26

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/execute/julia.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,9 @@ async function logStatus() {
853853
? undefined
854854
: new Date(worker.run_finished);
855855

856+
const secondsSinceStarted = runStarted !== undefined
857+
? (Date.now() - runStarted.getTime()) / 1000
858+
: undefined;
856859
const runDurationSeconds =
857860
runStarted !== undefined && runFinished !== undefined
858861
? (runFinished.getTime() - runStarted.getTime()) / 1000
@@ -868,7 +871,11 @@ async function logStatus() {
868871
info(
869872
` worker ${index + 1}:
870873
path: ${worker.path}
871-
run started: ${runStarted ? simpleDateTimeString(runStarted) : "-"}
874+
run started: ${runStarted ? simpleDateTimeString(runStarted) : "-"}${
875+
secondsSinceStarted
876+
? ` (${formatSeconds(secondsSinceStarted)} ago)`
877+
: ""
878+
}
872879
run finished: ${runFinished ? simpleDateTimeString(runFinished) : "-"}${
873880
runDurationSeconds
874881
? ` (took ${formatSeconds(runDurationSeconds)})`

0 commit comments

Comments
 (0)