Skip to content

Commit

Permalink
make worker-id easier to track (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin authored Sep 14, 2023
1 parent be93c58 commit d6d0d14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/orchestrator/liveness.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package orchestrator
import (
"context"
"errors"
"fmt"
"sync"
"time"

Expand Down Expand Up @@ -48,7 +49,8 @@ func (o *Orchestrator) startWorkerLivenessCheckin(ctx context.Context) {
}

func (o *Orchestrator) checkinRoutine(ctx context.Context) {
me := registry.GetID("condition-orchestrator")
workerName := fmt.Sprintf("orchestrator-%s", o.facility)
me := registry.GetID(workerName)
o.logger.WithField("id", me.String()).Info("worker id assigned")
if err := registry.RegisterController(me); err != nil {
metrics.DependencyError("liveness", "register")
Expand Down

0 comments on commit d6d0d14

Please sign in to comment.