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

Cannot specific queueName when dispatch job. #12

Closed
miinion opened this issue Oct 25, 2022 · 1 comment · Fixed by #15
Closed

Cannot specific queueName when dispatch job. #12

miinion opened this issue Oct 25, 2022 · 1 comment · Fixed by #15

Comments

@miinion
Copy link

miinion commented Oct 25, 2022

`
import { Queue } from '@IOC:Setten/Queue';

Queue.dispatch('App/Jobs/RegisterStripeCustomer', {...}, {
queueName: 'stripe',
});
`

This produce errors when compiling project

[ error ] typescript compiler errors app/Controllers/Http/CronJobController.ts:75:17 - error TS2769: No overload matches this call. Overload 1 of 2, '(job: "App/Jobs/CalculateUserStat", payload: CalculateUserStatPayload, options?: JobsOptions | undefined): Promise<string>', gave the following error. Argument of type '{ queueName: string; }' is not assignable to parameter of type 'JobsOptions'. Object literal may only specify known properties, and 'queueName' does not exist in type 'JobsOptions'. Overload 2 of 2, '(job: "App/Jobs/CalculateUserStat", payload: CalculateUserStatPayload, options?: JobsOptions | undefined): Promise<string>', gave the following error. Argument of type '{ queueName: string; }' is not assignable to parameter of type 'JobsOptions'. Object literal may only specify known properties, and 'queueName' does not exist in type 'JobsOptions'.

@RomainLanz
Copy link
Owner

Yes, this has not been released yet!

I will first update BullMQ and add some testing before releasing this feature.

@RomainLanz RomainLanz linked a pull request Dec 7, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants