Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: increase flag polling interval; add flag poller interval config #141

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

bgiori
Copy link
Collaborator

@bgiori bgiori commented Nov 24, 2024

Summary

  • Set the default flag polling interval to 5 min
  • Add polling interval config with min value of 1 min

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@bgiori bgiori requested review from tyiuhc and zhukaihan November 24, 2024 18:28
Comment on lines 118 to 122
config.flagConfigPollingIntervalMillis < minFlagPollerIntervalMillis
? minFlagPollerIntervalMillis
: config.flagConfigPollingIntervalMillis
? config.flagConfigPollingIntervalMillis
: Defaults.flagConfigPollingIntervalMillis,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add parenthesis?
Also A ? A : B == A ?? B if we're just testing for null or undefined.

Comment on lines 116 to 122
// Force minimum flag config polling interval.
flagConfigPollingIntervalMillis:
config.flagConfigPollingIntervalMillis < minFlagPollerIntervalMillis
? minFlagPollerIntervalMillis
: config.flagConfigPollingIntervalMillis
? config.flagConfigPollingIntervalMillis
: Defaults.flagConfigPollingIntervalMillis,
Copy link
Collaborator

@tyiuhc tyiuhc Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify for legibility:

flagConfigPollingIntervalMillis = config.flagConfigPollingIntervalMillis
  ? Math.max(config.flagConfigPollingIntervalMillis, minFlagPollerIntervalMillis)
  : Defaults.flagConfigPollingIntervalMillis;

@bgiori bgiori merged commit 29b1640 into main Nov 26, 2024
6 checks passed
@bgiori bgiori deleted the flag-poller-interval branch November 26, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants