Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No overload matches this call error when using @Processor decorator #72

Open
mannes-paqt opened this issue Apr 19, 2024 · 0 comments
Open

Comments

@mannes-paqt
Copy link

mannes-paqt commented Apr 19, 2024

Hello,

we are evaluating bullmq-pro with NestJS, we want to use the rate-limiting per group. However when i define the group rate limit in the @Processor decorator I get a typescript error about the decorators overload, there seems to be an error in processor.decorator.d.ts.

code

@Processor(
  'queueName',
  {
  removeOnComplete: true,
  removeOnFail: true,
  concurrency: 4,
  limiter: {
    max: 200, // 4 clients of 50 rqs/min
    duration: 60_000,
  },
  group: {
    limit: {
      max: 50,
      duration: 60_000,
    },
    concurrency: 2,
  },
}
)
export class HttpClientWorker extends WorkerHost {}

result

ERROR in ./libs/client/src/lib/http-client/http-client.worker.ts:13:3
TS2769: No overload matches this call.
  Overload 2 of 4, '(processorOptions: ProcessorOptions, workerOptions: NestWorkerProOptions): ClassDecorator', gave the following error.
    Type 'string' has no properties in common with type 'ProcessorOptions'.
    12 | @Processor(
  > 13 |  'queueName',
       |   ^^^^^^^^^^^^^
    14 |   {
    15 |   removeOnComplete: true,
    16 |   removeOnFail: true,

webpack compiled with 1 error (4768bc57d3de24e6)

bullmq-pro 7.5
nestjs-bullmq-pro 3.0.0
nestjs 10.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant