Skip to content

Commit

Permalink
fix: agent send healthcheck each 5 seconds (#5508)
Browse files Browse the repository at this point in the history
  • Loading branch information
exu authored May 29, 2024
1 parent 3bae2be commit 189657a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/agent/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (

var _ common.ListenerLoader = (*Agent)(nil)

const HealthcheckInterval = 5 * time.Second

func (ag *Agent) Kind() string {
return "agent"
}
Expand Down Expand Up @@ -70,7 +72,7 @@ func (ag *Agent) runEventLoop(ctx context.Context) error {
return errors.Wrap(err, "failed to setup stream")
}

ticker := time.NewTicker(30 * time.Second)
ticker := time.NewTicker(HealthcheckInterval)
defer ticker.Stop()

for {
Expand Down

0 comments on commit 189657a

Please sign in to comment.