File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 8
8
import { getMaxDuration } from "@trigger.dev/core/v3/isomorphic" ;
9
9
import { RUNNING_STATUSES } from "~/components/runs/v3/TaskRunStatus" ;
10
10
import { logger } from "~/services/logger.server" ;
11
- import { eventRepository } from "~/v3/eventRepository.server" ;
11
+ import { eventRepository , rehydrateAttribute } from "~/v3/eventRepository.server" ;
12
12
import { machinePresetFromName } from "~/v3/machinePresets.server" ;
13
13
import { getTaskEventStoreTableForRun , type TaskEventStoreTable } from "~/v3/taskEventStore.server" ;
14
14
import { isFailedRunStatus , isFinalRunStatus } from "~/v3/taskStatus" ;
@@ -489,12 +489,17 @@ export class SpanPresenter extends BasePresenter {
489
489
} ;
490
490
}
491
491
case "attempt" : {
492
+ const isWarmStart = rehydrateAttribute < boolean > (
493
+ span . metadata ,
494
+ SemanticInternalAttributes . WARM_START
495
+ ) ;
496
+
492
497
return {
493
498
...data ,
494
499
entity : {
495
500
type : "attempt" as const ,
496
501
object : {
497
- isWarmStart : isWarmStart ( span . properties ) ,
502
+ isWarmStart,
498
503
} ,
499
504
} ,
500
505
} ;
Original file line number Diff line number Diff line change @@ -1638,7 +1638,7 @@ function rehydrateShow(properties: Prisma.JsonValue): { actions?: boolean } | un
1638
1638
return ;
1639
1639
}
1640
1640
1641
- function rehydrateAttribute < T extends AttributeValue > (
1641
+ export function rehydrateAttribute < T extends AttributeValue > (
1642
1642
properties : Prisma . JsonValue ,
1643
1643
key : string
1644
1644
) : T | undefined {
@@ -1656,7 +1656,9 @@ function rehydrateAttribute<T extends AttributeValue>(
1656
1656
1657
1657
const value = properties [ key ] ;
1658
1658
1659
- if ( ! value ) return ;
1659
+ if ( value === undefined ) {
1660
+ return ;
1661
+ }
1660
1662
1661
1663
return value as T ;
1662
1664
}
You can’t perform that action at this time.
0 commit comments