diff --git a/packages/twenty-server/src/engine/integrations/message-queue/drivers/pg-boss.driver.ts b/packages/twenty-server/src/engine/integrations/message-queue/drivers/pg-boss.driver.ts index e02ec650720c..8f875f75f1e0 100644 --- a/packages/twenty-server/src/engine/integrations/message-queue/drivers/pg-boss.driver.ts +++ b/packages/twenty-server/src/engine/integrations/message-queue/drivers/pg-boss.driver.ts @@ -41,9 +41,11 @@ export class PgBossDriver ) { return this.pgBoss.work( `${queueName}.*`, - { - teamConcurrency: options?.concurrency, - }, + options?.concurrency + ? { + teamConcurrency: options.concurrency, + } + : {}, async (job) => { await handler({ data: job.data, id: job.id, name: job.name }); },