|
47 | 47 | from splitio.sync.synchronizer import SplitTasks, SplitSynchronizers, Synchronizer, \ |
48 | 48 | LocalhostSynchronizer, RedisSynchronizer |
49 | 49 | from splitio.sync.manager import Manager, RedisManager |
50 | | -from splitio.sync.split import SplitSynchronizer, LocalSplitSynchronizer, LocalhostMode |
| 50 | +from splitio.sync.split import SplitSynchronizer, LocalSplitSynchronizer, LocalhostMode, _ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES |
51 | 51 | from splitio.sync.segment import SegmentSynchronizer, LocalSegmentSynchronizer |
52 | 52 | from splitio.sync.impression import ImpressionSynchronizer, ImpressionsCountSynchronizer |
53 | 53 | from splitio.sync.event import EventSynchronizer |
@@ -555,8 +555,13 @@ def _build_localhost_factory(cfg): |
555 | 555 | ready_event = threading.Event() |
556 | 556 | synchronizer = LocalhostSynchronizer(synchronizers, tasks) |
557 | 557 | manager = Manager(ready_event, synchronizer, None, False, sdk_metadata, telemetry_runtime_producer) |
558 | | - initialization_thread = threading.Thread(target=manager.start, name="SDKInitializer", daemon=True) |
559 | | - initialization_thread.start() |
| 558 | + |
| 559 | +# TODO: BUR is only applied for Localhost JSON mode, in future legacy and yaml will also use BUR |
| 560 | + if localhost_mode == LocalhostMode.JSON: |
| 561 | + initialization_thread = threading.Thread(target=manager.start, args = [_ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES], name="SDKInitializer", daemon=True) |
| 562 | + initialization_thread.start() |
| 563 | + else: |
| 564 | + manager.start(1) |
560 | 565 |
|
561 | 566 | recorder = StandardRecorder( |
562 | 567 | ImpressionsManager(StrategyDebugMode(), telemetry_runtime_producer), |
|
0 commit comments