Skip to content

Commit bd6ee2c

Browse files
committed
Only block with a batch if it’s a batchTriggerAndWait… 🤦‍♂️
1 parent 5dfa932 commit bd6ee2c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

apps/webapp/app/v3/services/batchTriggerV3.server.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class BatchTriggerV3Service extends WithRunEngine {
164164
},
165165
});
166166

167-
if (body.parentRunId) {
167+
if (body.parentRunId && body.resumeParentOnCompletion) {
168168
await this._engine.blockRunWithCreatedBatch({
169169
runId: RunId.fromFriendlyId(body.parentRunId),
170170
batchId: batch.id,
@@ -255,7 +255,7 @@ export class BatchTriggerV3Service extends WithRunEngine {
255255
},
256256
});
257257

258-
if (body.parentRunId) {
258+
if (body.parentRunId && body.resumeParentOnCompletion) {
259259
await this._engine.blockRunWithCreatedBatch({
260260
runId: RunId.fromFriendlyId(body.parentRunId),
261261
batchId: batch.id,
@@ -566,7 +566,11 @@ export class BatchTriggerV3Service extends WithRunEngine {
566566
return { status: "INCOMPLETE", workingIndex };
567567
}
568568

569-
if (parentRunId && updatedBatch.runIds.length === updatedBatch.runCount) {
569+
if (
570+
parentRunId &&
571+
resumeParentOnCompletion &&
572+
updatedBatch.runIds.length === updatedBatch.runCount
573+
) {
570574
await this._engine.unblockRunForCreatedBatch({
571575
runId: RunId.fromFriendlyId(parentRunId),
572576
batchId: batch.id,

0 commit comments

Comments
 (0)