async documentation显示了async.auto的retryable示例,但是我想知道async.waterfall的模式是什么样子的?我一直无法追踪到任何例子。它会是这样的吗:
async.waterfall([
step1,
step2,
async.retryable([opts = {times: 5, interval: 3000}], step3),
step4
],
function(error, result) {
if (error) { console.error(error); return;
} console.log(result);
}); 发布于 2016-05-30 03:27:45
在进一步的研究中,我已经确认这是下面async.waterfall上下文中的async.retryable的正确模式(步骤3):
async.waterfall([
step1,
step2,
async.retryable([opts = {times: 5, interval: 3000}], step3),
step4
],
function(error, result) {
if (error) { console.error(error); return;
} console.log(result);
}); https://stackoverflow.com/questions/37424172
复制相似问题