diff --git a/src/backend/booster/bk_dist/booster/command/process.go b/src/backend/booster/bk_dist/booster/command/process.go index 49727fc5..a0f971fb 100644 --- a/src/backend/booster/bk_dist/booster/command/process.go +++ b/src/backend/booster/bk_dist/booster/command/process.go @@ -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 diff --git a/src/backend/booster/bk_dist/controller/pkg/api/v1/sdk.go b/src/backend/booster/bk_dist/controller/pkg/api/v1/sdk.go index abfcc4b1..5addb32b 100644 --- a/src/backend/booster/bk_dist/controller/pkg/api/v1/sdk.go +++ b/src/backend/booster/bk_dist/controller/pkg/api/v1/sdk.go @@ -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 } } diff --git a/src/backend/booster/server/pkg/manager/normal/layer.go b/src/backend/booster/server/pkg/manager/normal/layer.go index 5a5a6efa..fa2afaf1 100644 --- a/src/backend/booster/server/pkg/manager/normal/layer.go +++ b/src/backend/booster/server/pkg/manager/normal/layer.go @@ -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 } @@ -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.