File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
apps/webapp/app/v3/services Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -169,21 +169,43 @@ export class CreateCheckpointService extends BaseService {
169
169
attemptId : attempt . id ,
170
170
taskRunId : attempt . taskRunId ,
171
171
type : "WAIT_FOR_TASK" ,
172
+ reason,
172
173
} ) ;
173
174
await marqs ?. cancelHeartbeat ( attempt . taskRunId ) ;
174
175
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
+
175
195
const resumeService = new ResumeDependentParentsService ( this . _prisma ) ;
176
- const result = await resumeService . call ( { id : attempt . taskRunId } ) ;
196
+ const result = await resumeService . call ( { id : childRun . id } ) ;
177
197
178
198
if ( result . success ) {
179
199
logger . log ( "CreateCheckpointService: Resumed dependent parents" , {
180
200
result,
201
+ childRun,
181
202
attempt,
182
203
checkpointEvent,
183
204
} ) ;
184
205
} else {
185
206
logger . error ( "CreateCheckpointService: Failed to resume dependent parents" , {
186
207
result,
208
+ childRun,
187
209
attempt,
188
210
checkpointEvent,
189
211
} ) ;
You can’t perform that action at this time.
0 commit comments