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

JobFlow not registering names #468

Closed
Pietrox opened this issue Apr 12, 2021 · 1 comment
Closed

JobFlow not registering names #468

Pietrox opened this issue Apr 12, 2021 · 1 comment

Comments

@Pietrox
Copy link

Pietrox commented Apr 12, 2021

While trying to add a JobFlow the property name is not being used in the queue.
In redis property name shows "default" and it fails to get a job handler.

Methods I used were manual hardcoded and also via objects factory, both bring same result.
Sample code:

export class Producer {
    constructor(private readonly flow: Flow) {
    }

    async createJob() {
        await this.flow.add({
            name: 'Job', queueName: 'JobQueue', children: [
                {
                    name: 'Child1', queueName: 'ChildrenQueue', data: {foo: 'bar'},
                }, {
                    name: 'Child2', queueName: 'ChildrenQueue', data: {foo: 'bar'},
                }
                ]
        })
    }
}

failedReason: Missing process handler for job type __default__

With default processor for all non-named Jobs it seems to work fine.

@Pietrox Pietrox changed the title JobFlow not accepting names JobFlow not registering names Apr 12, 2021
@Pietrox
Copy link
Author

Pietrox commented Apr 12, 2021

Ok, I completely stripped it out from constructor and did the documentation way - it works fine now.

This is Nestjs not being ready for this feature. So I will mention it @nestjs/bull.

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