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

Named jobs failure handling #252

Open
mjgp2 opened this issue Jan 28, 2020 · 4 comments
Open

Named jobs failure handling #252

mjgp2 opened this issue Jan 28, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@mjgp2
Copy link

mjgp2 commented Jan 28, 2020

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Currently, failure handling in queues requires switch statements on the job name inside the method decorated with @OnQueueFailed - it would be preferable to be able to specify a job name as you can in @Process for failure handling and have a method to handle failure for each named job.

@kamilmysliwiec kamilmysliwiec added the enhancement New feature or request label Jan 28, 2020
@tjhiggins
Copy link

Just started using and I think you can ref name in the onQueueFailed.

The following works for me as expected:

@Process('install-application')
async installApplication(job: Job) { ... }

@OnQueueFailed({ name: 'install-application' })
async installApplicationFailed(job: Job) { ... }

@Process('uninstall-application')
async uninstallApplication(job: Job) { ... }

@OnQueueFailed({ name: 'uninstall-application' })
async uninstallApplicationFailed(job: Job) { ... }

@mahmed0715
Copy link

what are the events for a single queue job failed and at the end the whole queue was done? TIA

@liangwei0101
Copy link

I have the same problem

@yafimchik
Copy link

I have the same problem. I cannot find api docs, where I can read about types (Typescript), so I don't know what "name" exectly means in options of event decorators. I try to use @OnQueueCompleted({ name: 'something' }), and whatever I put on "name" in options, method doesn't work. Without options it works, where i can filter job by name using switch/if statements.

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

No branches or pull requests

6 participants