Skip to content

Commit 33b7607

Browse files
committed
Pass through the parentRunId and resumeParentOnCompletion
1 parent 6aad704 commit 33b7607

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

apps/webapp/app/services/worker.server.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ import {
5656
} from "~/v3/services/cancelDevSessionRuns.server";
5757
import { logger } from "./logger.server";
5858
import { BatchProcessingOptions, BatchTriggerV2Service } from "~/v3/services/batchTriggerV2.server";
59+
import {
60+
BatchProcessingOptions as BatchProcessingOptionsV3,
61+
BatchTriggerV3Service,
62+
} from "~/v3/services/batchTriggerV3.server";
5963

6064
const workerCatalog = {
6165
indexEndpoint: z.object({
@@ -199,6 +203,7 @@ const workerCatalog = {
199203
}),
200204
"v3.cancelDevSessionRuns": CancelDevSessionRunsServiceOptions,
201205
"v3.processBatchTaskRun": BatchProcessingOptions,
206+
"v3.processBatchTaskRunV3": BatchProcessingOptionsV3,
202207
};
203208

204209
const executionWorkerCatalog = {
@@ -735,6 +740,15 @@ function getWorkerQueue() {
735740
handler: async (payload, job) => {
736741
const service = new BatchTriggerV2Service(payload.strategy);
737742

743+
await service.processBatchTaskRun(payload);
744+
},
745+
},
746+
"v3.processBatchTaskRunV3": {
747+
priority: 0,
748+
maxAttempts: 5,
749+
handler: async (payload, job) => {
750+
const service = new BatchTriggerV3Service(payload.strategy);
751+
738752
await service.processBatchTaskRun(payload);
739753
},
740754
},

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,8 @@ export class BatchTriggerV3Service extends WithRunEngine {
759759
task: item,
760760
currentIndex: workingIndex,
761761
options,
762+
parentRunId,
763+
resumeParentOnCompletion,
762764
});
763765

764766
workingIndex++;
@@ -799,8 +801,8 @@ export class BatchTriggerV3Service extends WithRunEngine {
799801
task: { runFriendlyId: string; item: BatchTriggerTaskV2RequestBody["items"][number] };
800802
currentIndex: number;
801803
options?: BatchTriggerTaskServiceOptions;
802-
parentRunId?: string | undefined;
803-
resumeParentOnCompletion?: boolean | undefined;
804+
parentRunId: string | undefined;
805+
resumeParentOnCompletion: boolean | undefined;
804806
}) {
805807
logger.debug("[BatchTriggerV3][processBatchTaskRunItem] Processing item", {
806808
batchId: batch.friendlyId,

0 commit comments

Comments
 (0)