File tree Expand file tree Collapse file tree
internal-packages/schedule-engine/src/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,8 +183,10 @@ export class ScheduleEngine {
183183 deduplicationKey : instance . taskSchedule . deduplicationKey ,
184184 } ) ;
185185
186+ let persisted = false ;
187+
186188 if ( scheduleWindow && instance . schedulePhase === null ) {
187- const result = await this . prisma . taskScheduleInstance . updateMany ( {
189+ await this . prisma . taskScheduleInstance . updateMany ( {
188190 where : {
189191 id : instance . id ,
190192 schedulePhase : null ,
@@ -193,12 +195,12 @@ export class ScheduleEngine {
193195 schedulePhase,
194196 } ,
195197 } ) ;
196- span . setAttribute ( "schedule_phase_persisted_during_registration" , result . count === 1 ) ;
198+ persisted = true ;
197199 }
198200
199201 span . setAttribute (
200202 "schedule_phase_source" ,
201- instance . schedulePhase === null ? "derived " : "persisted"
203+ instance . schedulePhase !== null ? "db " : persisted ? "persisted" : "ephemeral "
202204 ) ;
203205 span . setAttribute ( "schedule_phase" , schedulePhase ) ;
204206
You can’t perform that action at this time.
0 commit comments