File tree Expand file tree Collapse file tree
apps/webapp/app/v3/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,21 +169,43 @@ export class CreateCheckpointService extends BaseService {
169169 attemptId : attempt . id ,
170170 taskRunId : attempt . taskRunId ,
171171 type : "WAIT_FOR_TASK" ,
172+ reason,
172173 } ) ;
173174 await marqs ?. cancelHeartbeat ( attempt . taskRunId ) ;
174175
176+ const childRun = await this . _prisma . taskRun . findFirst ( {
177+ where : {
178+ friendlyId : reason . friendlyId ,
179+ } ,
180+ } ) ;
181+
182+ if ( ! childRun ) {
183+ logger . error ( "CreateCheckpointService: WAIT_FOR_TASK child run not found" , {
184+ friendlyId : reason . friendlyId ,
185+ } ) ;
186+
187+ return {
188+ success : true ,
189+ checkpoint,
190+ event : checkpointEvent ,
191+ keepRunAlive : false ,
192+ } ;
193+ }
194+
175195 const resumeService = new ResumeDependentParentsService ( this . _prisma ) ;
176- const result = await resumeService . call ( { id : attempt . taskRunId } ) ;
196+ const result = await resumeService . call ( { id : childRun . id } ) ;
177197
178198 if ( result . success ) {
179199 logger . log ( "CreateCheckpointService: Resumed dependent parents" , {
180200 result,
201+ childRun,
181202 attempt,
182203 checkpointEvent,
183204 } ) ;
184205 } else {
185206 logger . error ( "CreateCheckpointService: Failed to resume dependent parents" , {
186207 result,
208+ childRun,
187209 attempt,
188210 checkpointEvent,
189211 } ) ;
You can’t perform that action at this time.
0 commit comments