Skip to content

Commit

Permalink
fix: 文件发送失败后会尝试其他worker成功重试优化 TencentBlueKing#330
Browse files Browse the repository at this point in the history
  • Loading branch information
flyy1012 committed Dec 9, 2024
1 parent a4abc10 commit 2f7447b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ func (m *Mgr) ExecuteTask(
// 远程任务失败后,将文件大小和压缩大小都置为初始值,方便其他worker重试
for i, c := range remoteReq.Req.Commands {
for j, f := range c.Inputfiles {
if f.CompressedSize < 0 && f.InitCompressedSize > 0 {
if f.CompressedSize < 0 && f.InitCompressedSize >= 0 {
remoteReq.Req.Commands[i].Inputfiles[j].CompressedSize = remoteReq.Req.Commands[i].Inputfiles[j].InitCompressedSize
}
if f.FileSize < 0 && f.InitFileSize > 0 {
if f.FileSize < 0 && f.InitFileSize >= 0 {
remoteReq.Req.Commands[i].Inputfiles[j].FileSize = remoteReq.Req.Commands[i].Inputfiles[j].InitFileSize
}
}
Expand Down

0 comments on commit 2f7447b

Please sign in to comment.