|
5 | 5 | """ |
6 | 6 |
|
7 | 7 | from typing import Optional, Callable, List, Set |
| 8 | +from threading import Event |
8 | 9 |
|
9 | 10 | from ldclient.feature_store import InMemoryFeatureStore |
10 | 11 | from ldclient.impl.util import log, validate_application_info |
@@ -155,7 +156,7 @@ def __init__(self, |
155 | 156 | initial_reconnect_delay: float=1, |
156 | 157 | defaults: dict={}, |
157 | 158 | send_events: Optional[bool]=None, |
158 | | - update_processor_class: Optional[Callable[[str, 'Config', FeatureStore], UpdateProcessor]]=None, |
| 159 | + update_processor_class: Optional[Callable[['Config', FeatureStore, Event], UpdateProcessor]]=None, |
159 | 160 | poll_interval: float=30, |
160 | 161 | use_ldd: bool=False, |
161 | 162 | feature_store: Optional[FeatureStore]=None, |
@@ -218,8 +219,8 @@ def __init__(self, |
218 | 219 | reset its set of known context keys. |
219 | 220 | :param feature_requester_class: A factory for a FeatureRequester implementation taking the sdk key and config |
220 | 221 | :param event_processor_class: A factory for an EventProcessor implementation taking the config |
221 | | - :param update_processor_class: A factory for an UpdateProcessor implementation taking the sdk key, |
222 | | - config, and FeatureStore implementation |
| 222 | + :param update_processor_class: A factory for an UpdateProcessor implementation taking the config, a FeatureStore |
| 223 | + implementation, and a threading `Event` to signal readiness. |
223 | 224 | :param diagnostic_opt_out: Unless this field is set to True, the client will send |
224 | 225 | some diagnostics data to the LaunchDarkly servers in order to assist in the development of future SDK |
225 | 226 | improvements. These diagnostics consist of an initial payload containing some details of SDK in use, |
@@ -342,7 +343,7 @@ def stream_uri(self): |
342 | 343 | return self.__stream_uri + STREAM_FLAGS_PATH |
343 | 344 |
|
344 | 345 | @property |
345 | | - def update_processor_class(self) -> Optional[Callable[[str, 'Config', FeatureStore], UpdateProcessor]]: |
| 346 | + def update_processor_class(self) -> Optional[Callable[['Config', FeatureStore, Event], UpdateProcessor]]: |
346 | 347 | return self.__update_processor_class |
347 | 348 |
|
348 | 349 | @property |
|
0 commit comments