Skip to content

Commit

Permalink
use const for cohort poller interval
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc committed Aug 6, 2024
1 parent 5d6055f commit 28c1793
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/experiment/local/deployment_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import (
"fmt"
"strings"
"sync"
"time"

"github.com/amplitude/experiment-go-server/internal/evaluation"
"github.com/amplitude/experiment-go-server/internal/logger"
)

const CohortPollerInterval = 60 * time.Second

type deploymentRunner struct {
config *Config
flagConfigApi flagConfigApi
Expand Down Expand Up @@ -55,7 +58,7 @@ func (dr *deploymentRunner) start() error {
})

if dr.cohortLoader != nil {
dr.poller.Poll(dr.config.FlagConfigPollerInterval, func() {
dr.poller.Poll(CohortPollerInterval, func() {
dr.updateStoredCohorts()
})
}
Expand Down

0 comments on commit 28c1793

Please sign in to comment.