Skip to content

Commit

Permalink
feat: worker选取及恢复机制优化 TencentBlueKing#311
Browse files Browse the repository at this point in the history
  • Loading branch information
flyy1012 committed Nov 20, 2024
1 parent d25d27e commit 7693da3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ func (r *CommonRemoteHandler) ExecuteSendFileLongTCP(
// 加本地资源锁
locallocked := false
if mgr != nil {
if mgr.LockSlots(dcSDK.JobUsageLocalExe, 1) {
if mgr.LockSlots(dcSDK.JobUsageDefault, 1) {
locallocked = true
blog.Infof("remotehandle: succeed to get one local lock")
blog.Infof("remotehandle: succeed to get one default lock")
}
}

Expand Down Expand Up @@ -261,8 +261,8 @@ func (r *CommonRemoteHandler) ExecuteSendFileLongTCP(
t1 = t2

if locallocked {
mgr.UnlockSlots(dcSDK.JobUsageLocalExe, 1)
blog.Infof("remotehandle: succeed to release one local lock")
mgr.UnlockSlots(dcSDK.JobUsageDefault, 1)
blog.Infof("remotehandle: succeed to release one default lock")
}

if err != nil {
Expand Down

0 comments on commit 7693da3

Please sign in to comment.