Do not treat controller registration error as fatal (#100)

This commit is contained in:
Nikolay Edigaryev 2023-06-29 19:29:32 +04:00 committed by GitHub
parent 9b0cce182f
commit 3c3b8e8180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -22,7 +22,6 @@ import (
const pollInterval = 5 * time.Second
var ErrPollFailed = errors.New("failed to poll controller")
var ErrRegistrationFailed = errors.New("failed to register worker on the controller")
type Worker struct {
name string
@ -108,7 +107,7 @@ func (worker *Worker) runNewSession(ctx context.Context) error {
if err := worker.registerWorker(subCtx); err != nil {
worker.logger.Warnf("failed to register worker: %v", err)
return ErrRegistrationFailed
return nil
}
go func() {