Skip to content

Commit

Permalink
When replaying, using the concurrencyLimit from the original run’s queue
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-aitken committed Dec 12, 2024
1 parent 1c631a1 commit ebd9767
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions apps/webapp/app/v3/services/replayTaskRun.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,27 @@ export class ReplayTaskRunService extends BaseService {
environmentId: authenticatedEnvironment.id,
});

//get the queue from the original run, so we can use the same settings on the replay
const taskQueue = await this._prisma.taskQueue.findFirst({
where: {
runtimeEnvironmentId: authenticatedEnvironment.id,
name: existingTaskRun.queue,
},
});

const triggerTaskService = new TriggerTaskService();
return await triggerTaskService.call(
existingTaskRun.taskIdentifier,
authenticatedEnvironment,
{
payload: parsedPayload,
options: {
queue: {
name: existingTaskRun.queue,
},
queue: taskQueue
? {
name: taskQueue.name,
concurrencyLimit: taskQueue.concurrencyLimit ?? undefined,
}
: undefined,
concurrencyKey: existingTaskRun.concurrencyKey ?? undefined,
test: existingTaskRun.isTest,
payloadType: payloadPacket.dataType,
Expand Down

0 comments on commit ebd9767

Please sign in to comment.