Skip to content

Commit 4b3a459

Browse files
feat: default enable SSE connections
1 parent c5a2565 commit 4b3a459

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ target/
7070
.benchmarks
7171
benchmark.json
7272

73-
pip-wheel-metadata/
73+
pip-wheel-metadata/
74+
.venv/

devcycle_python_sdk/managers/config_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _get_config(self, last_modified: Optional[float] = None):
8080

8181
json_config = json.dumps(self._config)
8282
self._local_bucketing.store_config(json_config)
83-
if self._options.enable_beta_realtime_updates:
83+
if not self._options.disable_realtime_updates:
8484
if self._sse_manager is None:
8585
self._sse_manager = SSEManager(
8686
self.sse_state,

devcycle_python_sdk/options.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(
4646
disable_automatic_event_logging: bool = False,
4747
disable_custom_event_logging: bool = False,
4848
enable_beta_realtime_updates: bool = False,
49+
disable_realtime_updates: bool = False,
4950
):
5051
self.events_api_uri = events_api_uri
5152
self.config_cdn_uri = config_cdn_uri
@@ -61,7 +62,12 @@ def __init__(
6162
self.on_client_initialized = on_client_initialized
6263
self.event_request_timeout_ms = event_request_timeout_ms
6364
self.event_retry_delay_ms = event_retry_delay_ms
64-
self.enable_beta_realtime_updates = enable_beta_realtime_updates
65+
self.disable_realtime_updates = disable_realtime_updates
66+
67+
if enable_beta_realtime_updates:
68+
logger.warning(
69+
f"DevCycle: `enable_beta_realtime_updates` is deprecated and will be removed in a future release.",
70+
)
6571

6672
if self.flush_event_queue_size >= self.max_event_queue_size:
6773
logger.warning(

example/local_bucketing_client_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def main():
2121

2222
# create an instance of the DevCycle Client object
2323
server_sdk_key = os.environ["DEVCYCLE_SERVER_SDK_KEY"]
24-
options = DevCycleLocalOptions(enable_beta_realtime_updates=True)
24+
options = DevCycleLocalOptions()
2525
client = DevCycleLocalClient(server_sdk_key, options)
2626

2727
# Wait for DevCycle to initialize and load the configuration

0 commit comments

Comments
 (0)