Search code examples
node.jsfirebase-queue

Retry logic in Firebase Queue


I am using fire-base queue in my node.js application. I want to understand, if there is any way available so that a queue can retry and process remaining tasks in case error occurred while execution of any task.


Solution

  • According to the documentation, you can specify the number of retry attempts using retries (which defaults to zero):

    retries - The default spec doesn't retry failed tasks. When a task fails, if there are any remaining attempts, the queue will restart the task by setting the task's _state to its spec's start_state.