You can waterfall two waterfalls
function createWaterfall(commands) {
return function(callback) {
Async.waterfall(commands, callback);
}
}
var waterfalls = [createWaterfall(readCommands),
createWaterfall(writeCommands)];
Async.waterfall(waterfalls, function(err) {
//final result
})
I have a set of read commands that I have to in sequence. Any fails,
processing stops.
readCommands is an array of read functions...
async.waterfall(readCommands, function(err) {
if (err) {
console.log(err);
res.send(500, { error : err.toString(