Skip to content

Commit

Permalink
Handle no concurrency option
Browse files Browse the repository at this point in the history
  • Loading branch information
thomtrp committed Jun 19, 2024
1 parent d045bcb commit 9ef6ad4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ export class PgBossDriver
) {
return this.pgBoss.work<T>(
`${queueName}.*`,
{
teamConcurrency: options?.concurrency,
},
options?.concurrency
? {
teamConcurrency: options?.concurrency,
}
: {},
async (job) => {
await handler({ data: job.data, id: job.id, name: job.name });
},
Expand Down

0 comments on commit 9ef6ad4

Please sign in to comment.