Named jobs failure handling
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.
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) { ... }
what are the events for a single queue job failed and at the end the whole queue was done? TIA
I have the same problem
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.