runner/logfile: write duration line to log header (T2.3)

Pass durationMS to writeRunLog and include it as 'duration' in the
log header for persistence.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-24 08:11:05 +03:00
parent 42d73b9eb0
commit 2b0cdb57f4
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func RunJob(ctx context.Context, job *domain.Job, trigger string, logsDir string
now := time.Now()
timestamp := now.Format("2006-01-02 15:04:05")
logFile := writeRunLog(logsDir, *job, trigger, state, detail, output, now)
logFile := writeRunLog(logsDir, *job, trigger, state, detail, output, durationMS, now)
// The runner is now pure with respect to the job: it returns a RunRecord and
// lets the caller fold that record into the job's JobRuntime. Run state no