Restarting firebase queue when node process has crashed

时间:2018-03-21 06:15:23

标签: node.js firebase firebase-queue

I'm using firebase-queue for running some simple tasks. Suppose a task has been picked up by a worker and its state has been updated as in_progress. Now node crashes and the worker exists no more. The next time I restart node, how can I make sure that the tasks that were earlier in_progress gets picked up by firebase-queue after the restart? I'm using specs where I have defined the error_state, start_state, finished_state, in_progress_state and retries.

1 个答案:

答案 0 :(得分:0)

我设法让它发挥作用。我只是设置retries属性。还应手动设置timeout。设置timeout为我做了工作