Skip to content

Commit ebd9767

Browse files
committed
When replaying, using the concurrencyLimit from the original run’s queue
1 parent 1c631a1 commit ebd9767

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,27 @@ export class ReplayTaskRunService extends BaseService {
7878
environmentId: authenticatedEnvironment.id,
7979
});
8080

81+
//get the queue from the original run, so we can use the same settings on the replay
82+
const taskQueue = await this._prisma.taskQueue.findFirst({
83+
where: {
84+
runtimeEnvironmentId: authenticatedEnvironment.id,
85+
name: existingTaskRun.queue,
86+
},
87+
});
88+
8189
const triggerTaskService = new TriggerTaskService();
8290
return await triggerTaskService.call(
8391
existingTaskRun.taskIdentifier,
8492
authenticatedEnvironment,
8593
{
8694
payload: parsedPayload,
8795
options: {
88-
queue: {
89-
name: existingTaskRun.queue,
90-
},
96+
queue: taskQueue
97+
? {
98+
name: taskQueue.name,
99+
concurrencyLimit: taskQueue.concurrencyLimit ?? undefined,
100+
}
101+
: undefined,
91102
concurrencyKey: existingTaskRun.concurrencyKey ?? undefined,
92103
test: existingTaskRun.isTest,
93104
payloadType: payloadPacket.dataType,

0 commit comments

Comments
 (0)