Skip to content

Commit da6a66e

Browse files
committed
v3: fix task queues with concurrency = 0 getting cleared on task trigger
1 parent 7c36a1a commit da6a66e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,12 @@ export class TriggerTaskService extends BaseService {
176176
}
177177

178178
if (body.options?.queue) {
179-
const concurrencyLimit = body.options.queue.concurrencyLimit
180-
? Math.max(0, body.options.queue.concurrencyLimit)
181-
: null;
182-
const taskQueue = await prisma.taskQueue.upsert({
179+
const concurrencyLimit =
180+
typeof body.options.queue.concurrencyLimit === "number"
181+
? Math.max(0, body.options.queue.concurrencyLimit)
182+
: undefined;
183+
184+
const taskQueue = await tx.taskQueue.upsert({
183185
where: {
184186
runtimeEnvironmentId_name: {
185187
runtimeEnvironmentId: environment.id,

0 commit comments

Comments
 (0)