kaliberjs / firebase-queue

A trimmed and more robust version of the original Firebase Queue
MIT License
20 stars 3 forks source link

Add `reportErrorsFromProcessTask` option #13

Open EECOLOR opened 5 years ago

EECOLOR commented 5 years ago

Please vote on this issue if you would like this feature to be added.


This feature request came from https://github.com/kaliberjs/firebase-queue/issues/11

The following snippets would then be equivalent (the same):

new Queue({ options: { reportErrorsFromProcessTask: true }, ... })
...
async function processTask(task) {
   ...
}
new Queue({ options: { reportErrorsFromProcessTask: false }, ... })
...
async function processTask(task) {
   try { ... }
   catch (e) { reportError(e); throw e }
}