Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: to #50555373 修复windows下删除job后,缓冲文件不会删除的问题 #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
elwing63 merged 14 commits into aliyun:develop from shungang:csg/feat/develop/48424264
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
3c9bf1f
fix: when saving the code module, change the head encoding to gzip, c...
Sep 6, 2022
73497da
fix: the latest mac operating system login requestId compatibility e...
Oct 26, 2022
befdb9b
fix: Repair the Japanese name habit
Oct 26, 2022
b4c9cde
fix: to #48424264 添加上传错误时展示ec code 和 request id
Apr 20, 2023
185e136
feat: to #49342210 新增列举object最大数量设置
Apr 26, 2023
be94f80
feat: to #49342210 新增列举object最大数量设置, 修改提示
Apr 26, 2023
24a4ba0
feat: to #49342210 删除.vscode的git跟踪
Apr 27, 2023
f5ca449
fix: to #48424264 合并origin/develop 处理冲突
May 4, 2023
eca8735
fix: to #48424264 同步develop的变更
May 4, 2023
5cf0610
fix: to #48424264
Jun 28, 2023
799a2a0
fix: to #50555373 修复windows下删除job后,缓冲文件不会删除的问题
Jun 30, 2023
15a51c8
fix: add attachPolicyToUser retry
Sep 7, 2023
71ee085
fix: remove unuse callback fun
Sep 7, 2023
62a6150
Merge branch 'develop' into csg/feat/develop/48424264
shungang Sep 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 33 additions & 22 deletions app/main/files/modals/grant-modal.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ angular.module('web').controller('grantModalCtrl', [
privTypes: ['readOnly', 'all'],
privType: 'readOnly'
},
// eslint-disable-next-line no-useless-escape
policyNameReg: /^[a-z0-9A-Z\-]{1,128}$/,
mailSmtp: settingsSvs.mailSmtp.get(),
showEmailSettings: function() {
Expand Down Expand Up @@ -219,31 +220,41 @@ angular.module('web').controller('grantModalCtrl', [
var title = T('simplePolicy.title'); // 简化policy授权
var successMsg = T('simplePolicy.success'); // '应用policy成功'

let retry = 0; // policyName创建后需要等几秒才生效,故需要重试3次,使用setTimeout避免attachPolicyToUser提示policyName不存在
const retryFunc = ()=>{
if (retry < 3) {
retry++;
setTimeout(()=>{
ramSvs
.attachPolicyToUser(policyName, $scope.grant.userName) // 为指定用户添加权限
.then(function() {
// 发邮件
if (sendInfo) {
Mailer.send(sendInfo).then(
function(result) {
console.log(result);
Toast.success(T('mail.test.success'));
},
function(err) {
console.error(err);
Toast.error(err);
}
);
}

Toast.success(successMsg);
cancel();
}).catch(()=>{
retryFunc(); // 递归重试
});
}, 1000);
}
};
checkCreatePolicy(policyName, $scope.grant.policy, title).then(
function() {
switch ($scope.grant.toType) {
case 'user':
ramSvs
.attachPolicyToUser(policyName, $scope.grant.userName)
.then(function() {
// 发邮件
if (sendInfo) {
Mailer.send(sendInfo).then(
function(result) {
console.log(result);
Toast.success(T('mail.test.success'));
},
function(err) {
console.error(err);
Toast.error(err);
}
);
}

Toast.success(successMsg);
cancel();
});

retryFunc();
break;
case 'group':
ramSvs
Expand Down Expand Up @@ -294,7 +305,7 @@ angular.module('web').controller('grantModalCtrl', [
}
);

return df.promise;
// return df.promise;
}

function checkCreateUser(fn) {
Expand Down
4 changes: 2 additions & 2 deletions app/main/files/transfer/downloads.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

// 下载弹窗
angular.module('web').controller('transferDownloadsCtrl', [
'$scope',
'$timeout',
Expand Down Expand Up @@ -34,7 +34,7 @@ angular.module('web').controller('transferDownloadsCtrl', [
checkStartJob: checkStartJob,
openLocaleFolder: function(item) {
var suffix = item.status == 'finished' ? '' : '.download';

// eslint-disable-next-line no-undef
openLocaleFolder(item.to.path + suffix);
},

Expand Down
2 changes: 1 addition & 1 deletion node/ossstore/lib/download-job.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ DownloadJob.prototype._changeStatus = function (status, retryTimes) {
if (status == "failed" || status == "stopped" || status == "finished") {
self.endTime = new Date().getTime();
//util.closeFD(self.keepFd);

util.closeFD(self.fd); // #50555373 不关闭会导致windows下删除job后,缓冲文件不会删除
console.log("clear speed tid, status:", self.status);
clearInterval(self.speedTid);
self.speed = 0;
Expand Down
2 changes: 1 addition & 1 deletion node/ossstore/lib/upload-job-util.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function prepareChunks(filePath, checkPoints, fn) {

fs.stat(filePath, function (err, state) {
if (err) {
// callback(err);
console.error(err);
return;
}

Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /