fluture

Execute Fluture task in middle of Sanctuary pipe

半城伤御伤魂 提交于 2020-01-06 05:28:19
问题 I have a pipe like this: S.pipe([ getRequestFile, // not async S.chain(saveTemporary), // not async S.chain(copyImageToPublicPath), // async S.chain(copyFileToPath), // async S.chain(someLoggingFunction), // not async S.chain(sendResponse), // not async ]); There are 2 async functions in middle of this pipe. I want to await for copyImageToPublicPath and then await for copyFileToPath and then continue the normal flow After some search I found that there is Future.tryP function for doing async