我正在嘗試爲用戶獲取Project權限並嘗試稍後設置權限。項目和用戶映射有89866個對象。在完成不超過300次後出錯。是否有限制多少查詢,你可以在一定的時間內在Node RestApi中執行
Error:
{
"code": "ECONNRESET",
"errno": "ECONNRESET",
"syscall": "read"
}
return _.reduce(projectHash, function(promise, teamPermission, projectOID){
return promise.then(function(){
return rallyUtil.getProjectPermission('/user/' + userOID, '/project/' + projectOID).then(function(permission){
if(!permission || (permission.Role != teamPermission && permission.Role != 'Admin')){
//need to get user or else WSAPI server will throw a concurrency error
return rallyUtil.getUser('/user/' + userOID).then(function(){
return rallyUtil.setProjectPermission('/user/' + userOID, '/project/' + projectOID, teamPermission);
});
}
});
});
}, Promise.resolve());