This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [default polling to 10 seconds from 5 minutes; add configurable…
… value] (FF-2686) (#60) * feat: [default polling to 10 seconds from 5 minutes; add configurable value] (FF-2686) * leave default at 5 min; add comment for breaking change in future * add config for jitter * tox
- Loading branch information
1 parent
c015c4f
commit d1b4fa7
Showing
6 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
from eppo_client.assignment_logger import AssignmentLogger | ||
from eppo_client.base_model import SdkBaseModel | ||
|
||
from eppo_client.validation import validate_not_blank | ||
from eppo_client.constants import ( | ||
POLL_INTERVAL_SECONDS_DEFAULT, | ||
POLL_JITTER_SECONDS_DEFAULT, | ||
) | ||
|
||
|
||
class Config(SdkBaseModel): | ||
api_key: str | ||
base_url: str = "https://fscdn.eppo.cloud/api" | ||
assignment_logger: AssignmentLogger | ||
is_graceful_mode: bool = True | ||
poll_interval_seconds: int = POLL_INTERVAL_SECONDS_DEFAULT | ||
poll_jitter_seconds: int = POLL_JITTER_SECONDS_DEFAULT | ||
|
||
def _validate(self): | ||
validate_not_blank("api_key", self.api_key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# poller | ||
SECOND_MILLIS = 1000 | ||
MINUTE_MILLIS = 60 * SECOND_MILLIS | ||
POLL_JITTER_MILLIS = 30 * SECOND_MILLIS | ||
POLL_INTERVAL_MILLIS = 5 * MINUTE_MILLIS | ||
# We accidently shipped Python with a 5 minute poll interval. | ||
# Customers can set the poll interval to 30 seconds to match the behavior of the other server SDKs. | ||
# Please change this to 30 seconds when ready to bump to 4.0. | ||
POLL_JITTER_SECONDS_DEFAULT = 30 # 30 seconds | ||
POLL_INTERVAL_SECONDS_DEFAULT = 5 * 60 # 5 minutes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
__version__ = "3.4.0" | ||
# Note to developers: When ready to bump to 4.0, please change | ||
# the `POLL_INTERVAL_SECONDS` constant in `eppo_client/constants.py` | ||
# to 30 seconds to match the behavior of the other server SDKs. | ||
__version__ = "3.5.0" |