Skip to content

Commit 87b9570

Browse files
committed
refactor: Move FDV1_POLLING_ENDPOINT into datasource_common
Share the FDv1 polling endpoint from the sans-I/O datasource_common module (next to STREAM_ALL_PATH) so the sync and async feature requesters no longer each define their own copy.
1 parent 170b7cb commit 87b9570

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

ldclient/impl/datasource/datasource_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from ldclient.versioned_data_kind import FEATURES, SEGMENTS
1212

1313
STREAM_ALL_PATH = '/all'
14+
FDV1_POLLING_ENDPOINT = '/sdk/latest-all'
1415

1516
ParsedPath = namedtuple('ParsedPath', ['kind', 'key'])
1617

ldclient/impl/datasource/feature_requester.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88

99
import urllib3
1010

11+
from ldclient.impl.datasource.datasource_common import FDV1_POLLING_ENDPOINT
1112
from ldclient.impl.http import _http_factory
1213
from ldclient.impl.util import _headers, log, throw_if_unsuccessful_response
1314
from ldclient.interfaces import FeatureRequester
1415
from ldclient.versioned_data_kind import FEATURES, SEGMENTS
1516

16-
FDV1_POLLING_ENDPOINT = '/sdk/latest-all'
17-
18-
1917
CacheEntry = namedtuple('CacheEntry', ['data', 'etag'])
2018

2119

0 commit comments

Comments
 (0)