Skip to content

Commit

Permalink
chore: make const
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 committed Oct 25, 2024
1 parent 371fdcd commit cc34c3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controlplane/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
KeepAliveTime = 10 * time.Second
KeepAliveTimeout = 5 * time.Second
HealthCheckInterval = 60 * time.Second
SendPingInterval = HealthCheckInterval / 2
)

type Server struct {
Expand Down Expand Up @@ -105,7 +106,7 @@ func (s *Server) GetTestWorkflowNotificationsStream(srv cloud.TestKubeCloudAPI_G
defer cancel()
g, _ := errgroup.WithContext(ctx)

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

g.Go(func() error {
Expand Down Expand Up @@ -161,7 +162,7 @@ func (s *Server) GetLogsStream(srv cloud.TestKubeCloudAPI_GetLogsStreamServer) e
defer cancel()
g, _ := errgroup.WithContext(ctx)

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

g.Go(func() error {
Expand Down

0 comments on commit cc34c3e

Please sign in to comment.