2014-07-13 28 views

回答

2

鉴于云功能给出15秒完成,然后结束,我不认为你将有很多机会展示任何进展反正。如果这是一个多步骤过程,那么您应该在客户代码中使用Promises,并在那里提供适当的反馈,例如:

Parse.Cloud.run('step1', {}).then(function (step1Result) { 
    // show progress 
    console.log('step 1 done'); 
    return Parse.Cloud.run('step2', { data: ... }); 
}).then(function (step2Result) { 
    // show progress 
    console.log('step 2 done'); 
    // add steps as needed 
}, function (error) { 
    // catch all errors here... 
    console.log(error); 
});