+ if (this.opts.enableTasksQueue) {
+ if ((opts.tasksQueueOptions?.concurrency as number) <= 0) {
+ throw new Error(
+ `Invalid worker tasks concurrency '${
+ (opts.tasksQueueOptions as TasksQueueOptions).concurrency as number
+ }'`
+ )
+ }
+ this.opts.tasksQueueOptions = {
+ concurrency: opts.tasksQueueOptions?.concurrency ?? 1
+ }
+ }