Skip to content

Commit

Permalink
Merge pull request #148 from tbs60/dev_tming
Browse files Browse the repository at this point in the history
Dev tming
  • Loading branch information
tming authored Nov 22, 2023
2 parents ce38ba4 + 91300e6 commit e5c398b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/backend/booster/bk_dist/booster/command/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func newBooster(c *commandCli.Context) (*pkg.Booster, error) {
Scheme: ControllerScheme,
IP: controllerIP,
Port: ControllerPort,
Timeout: 5 * time.Second,
Timeout: 10 * time.Second,
LogDir: getLogDir(c.String(FlagLogDir)),
LogVerbosity: func() int {
// debug模式下, --v=3
Expand Down
4 changes: 2 additions & 2 deletions src/backend/booster/bk_dist/controller/pkg/api/v1/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,13 @@ func (s *sdk) register(config dcSDK.ControllerRegisterConfig) (dcSDK.ControllerW
tmp, _, err := s.request("POST", registerURI, data, config.BatchMode)
if err != nil {
retry := 0
for ; ; time.Sleep(100 * time.Millisecond) {
for ; ; time.Sleep(1000 * time.Millisecond) {
tmp, _, err = s.request("POST", registerURI, data, config.BatchMode)
if err == nil {
break
}
retry++
if retry >= 10 {
if retry >= 3 {
return nil, err
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/backend/booster/server/pkg/manager/normal/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (tc *taskBasicLayer) LockTask(taskID string, owner string) {
if ok {
mutex.Lock()
mutex.lastHold = time.Now().Local()
mutex.owner = owner
return
}

Expand Down Expand Up @@ -169,7 +170,7 @@ func (tc *taskBasicLayer) UnLockTask(taskID string) {
}
blog.V(5).Infof("layer: unlock task(%s) by owner(%s)", taskID, mutex.owner)
mutex.Unlock()
mutex.owner = ""
// mutex.owner = ""
}

// LockProject get a Write-Lock with projectID.
Expand Down

0 comments on commit e5c398b

Please sign in to comment.