Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
寻找一种方法让公牛以更高的优先级重试失败的工作。更具体地说,我希望在任何未失败的工作之前获得失败的工作。
设置“重试次数”之类的东西相当容易,但关于重试策略 afaik 就没有别的了。
您可以像这样指定优先级:
let newJob = await myQueue.add('queue-name', job.data, { ...{ priority: 1 }, ...job.opts });