You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 它是promise事物实现 不仅仅能处理错误还能回滚importTransactionfrom'promise-transaction';constt=newTransaction([{name: 'seed',perform: ()=>Promise.resolve(3),rollback: ()=>false,retries: 1,// optionally you can define how many retries you like to run if initial attemp fails for this step},{name: 'square',perform: (context)=>{returnPromise.resolve(context.data.seed*context.data.seed);},rollback: ()=>false,},]);returnt.process().then((result)=>{console.log(result);// should be value of 9 = 3 x 3});
No description provided.
The text was updated successfully, but these errors were encountered: