8000 fix(hatchery): break on already registering (#4248) · ovh/cds@b67b1e9 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit b67b1e9

Browse files
authored
fix(hatchery): break on already registering (#4248)
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
1 parent e515b80 commit b67b1e9

File tree

1 8000 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/hatchery/register.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func workerRegister(ctx context.Context, h Interface, startWorkerChan chan<- wor
2929
}
3030

3131
atomic.StoreInt64(&nbRegisteringWorkerModels, int64(len(currentRegistering)))
32+
loopModels:
3233
for k := range models {
3334
if models[k].Type != h.ModelType() {
3435
continue
@@ -57,7 +58,7 @@ func workerRegister(ctx context.Context, h Interface, startWorkerChan chan<- wor
5758
for _, w := range currentRegistering {
5859
if strings.Contains(w.Name, models[k].Name) {
5960
log.Info("hatchery> workerRegister> %s is already registering (%s)", models[k].Name, w.Name)
60-
continue
61+
continue loopModels
6162
}
6263
}
6364

0 commit comments

Comments
 (0)
0