Skip to content

Commit 5f0d45a

Browse files
committed
Set firstAttemptStartedAt when creating the first attempt
1 parent 1230871 commit 5f0d45a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

apps/webapp/app/presenters/v3/SpanPresenter.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export class SpanPresenter extends BasePresenter {
115115
//status + duration
116116
status: true,
117117
startedAt: true,
118+
firstAttemptStartedAt: true,
118119
createdAt: true,
119120
updatedAt: true,
120121
queuedAt: true,
@@ -322,6 +323,7 @@ export class SpanPresenter extends BasePresenter {
322323
status: run.status,
323324
createdAt: run.createdAt,
324325
startedAt: run.startedAt,
326+
firstAttemptStartedAt: run.firstAttemptStartedAt,
325327
updatedAt: run.updatedAt,
326328
delayUntil: run.delayUntil,
327329
expiredAt: run.expiredAt,

internal-packages/run-engine/src/engine/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ export class RunEngine {
10711071
data: {
10721072
status: "EXECUTING",
10731073
attemptNumber: nextAttemptNumber,
1074+
firstAttemptStartedAt: taskRun.attemptNumber === null ? new Date() : undefined,
10741075
},
10751076
include: {
10761077
tags: true,

0 commit comments

Comments
 (0)