record last finished timestamp for failures

This commit is contained in:
Alex Holliday committed 2026-06-22 09:58:11 -07:00
1 parent 10174da4f0
commit 9db4e557b3
3 files changed
+3 -1

No files matched your search

@@ -127,6 +127,7 @@ class MongoJobsRepository implements IJobsRepository {
nextScheduledAt: now + BACKOFF_MS,
lockedBy: null, // Remove lock
lockedUntil: null,
lastFinishedAt: now, // a failed run still finished used in getMetrics for failedAt timestamp
lastFailReason: error instanceof Error ? error.message : String(error),
},
$inc: {