Skip to content

Commit

Permalink
fix: run healtcheck only on leader (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 authored Sep 22, 2022
1 parent 8d3c7d2 commit e526c49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ type service struct {
}

func (s *service) Run(ctx context.Context) {
s.healthCheck.Initializing()
for {
select {
case <-time.After(s.cfg.PollWaitInterval):
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func run(
}
healthzAction := health.NewHealthzProvider(health.HealthzCfg{HealthyPollIntervalLimit: (actionsConfig.PollWaitInterval + actionsConfig.PollTimeout) * 2}, log)

healthzAction.Initializing()
svc := actions.NewService(
log,
actionsConfig,
Expand Down

0 comments on commit e526c49

Please sign in to comment.