File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/webapp/app/v3/services Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ export class BatchTriggerV3Service extends WithRunEngine {
261261 batchId : batch . id ,
262262 environmentId : environment . id ,
263263 projectId : environment . projectId ,
264+ tx,
264265 } ) ;
265266 }
266267
@@ -389,6 +390,8 @@ export class BatchTriggerV3Service extends WithRunEngine {
389390 batchSize : options . range . count ,
390391 items : $payload ,
391392 options : $options ,
393+ parentRunId : options . parentRunId ,
394+ resumeParentOnCompletion : options . resumeParentOnCompletion ,
392395 } ) ;
393396
394397 switch ( result . status ) {
@@ -549,7 +552,7 @@ export class BatchTriggerV3Service extends WithRunEngine {
549552 }
550553
551554 //add the run ids to the batch
552- await this . _prisma . batchTaskRun . update ( {
555+ const updatedBatch = await this . _prisma . batchTaskRun . update ( {
553556 where : { id : batch . id } ,
554557 data : {
555558 runIds : {
@@ -563,7 +566,7 @@ export class BatchTriggerV3Service extends WithRunEngine {
563566 return { status : "INCOMPLETE" , workingIndex } ;
564567 }
565568
566- if ( parentRunId ) {
569+ if ( parentRunId && updatedBatch . runIds . length === updatedBatch . runCount ) {
567570 await this . _engine . unblockRunForCreatedBatch ( {
568571 runId : RunId . fromFriendlyId ( parentRunId ) ,
569572 batchId : batch . id ,
You can’t perform that action at this time.
0 commit comments