Skip to content

Commit

Permalink
fix(hatchery): break on already registering (#4248)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored May 3, 2019
1 parent e515b80 commit b67b1e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/hatchery/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func workerRegister(ctx context.Context, h Interface, startWorkerChan chan<- wor
}

atomic.StoreInt64(&nbRegisteringWorkerModels, int64(len(currentRegistering)))
loopModels:
for k := range models {
if models[k].Type != h.ModelType() {
continue
Expand Down Expand Up @@ -57,7 +58,7 @@ func workerRegister(ctx context.Context, h Interface, startWorkerChan chan<- wor
for _, w := range currentRegistering {
if strings.Contains(w.Name, models[k].Name) {
log.Info("hatchery> workerRegister> %s is already registering (%s)", models[k].Name, w.Name)
continue
continue loopModels
}
}

Expand Down

0 comments on commit b67b1e9

Please sign in to comment.