Skip to content

Commit b78b7ee

Browse files
committed
rename mtk task calls
1 parent 534c21c commit b78b7ee

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

splitio/client/factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ def _build_in_memory_factory(api_key, cfg, sdk_url=None, events_url=None, # pyl
335335
imp_strategy = StrategyNoneMode(imp_counter)
336336
clear_filter_sync = ClearFilterSynchronizer(imp_strategy._unique_keys_tracker)
337337
unique_keys_synchronizer = UniqueKeysSynchronizer(InMemorySenderAdapter(apis['telemetry']), imp_strategy._unique_keys_tracker)
338-
unique_keys_task = UniqueKeysSyncTask(unique_keys_synchronizer.SendAll)
339-
clear_filter_task = ClearFilterSyncTask(clear_filter_sync.clearAll)
338+
unique_keys_task = UniqueKeysSyncTask(unique_keys_synchronizer.send_all)
339+
clear_filter_task = ClearFilterSyncTask(clear_filter_sync.clear_all)
340340
imp_strategy._unique_keys_tracker.set_queue_full_hook(unique_keys_task.flush)
341341
elif cfg['impressionsMode'] == ImpressionsMode.DEBUG:
342342
imp_strategy = StrategyDebugMode()

splitio/sync/unique_keys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, impressions_sender_adapter, uniqe_keys_tracker):
2020
self._max_bulk_size = _UNIQUE_KEYS_MAX_BULK_SIZE
2121
self._impressions_sender_adapter = impressions_sender_adapter
2222

23-
def SendAll(self):
23+
def send_all(self):
2424
"""
2525
Flush the unique keys dictionary to split back end.
2626
Limit each post to the max_bulk_size value.
@@ -81,7 +81,7 @@ def __init__(self, unique_keys_tracker):
8181
"""
8282
self._unique_keys_tracker = unique_keys_tracker
8383

84-
def clearAll(self):
84+
def clear_all(self):
8585
"""
8686
Clear the bloom filter cache
8787

tests/sync/test_unique_keys_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_sync_unique_keys_send_all(self, mtk_mocker):
3737
unique_keys_tracker.track('key'+str(i)+'', 'feature1')
3838
sender_adapter = InMemorySenderAdapter(mock.Mock())
3939
unique_keys_synchronizer = UniqueKeysSynchronizer(sender_adapter, unique_keys_tracker)
40-
unique_keys_synchronizer.SendAll()
40+
unique_keys_synchronizer.send_all()
4141
assert(mtk_mocker.call_count == int(total_mtks / unique_keys_synchronizer._max_bulk_size) + 1)
4242

4343
def mocked_record_unique_keys(self, cache):
@@ -50,6 +50,6 @@ def test_clear_all_filter(self, mocker):
5050
unique_keys_tracker.track('key'+str(i)+'', 'feature1')
5151

5252
clear_filter_sync = ClearFilterSynchronizer(unique_keys_tracker)
53-
clear_filter_sync.clearAll()
53+
clear_filter_sync.clear_all()
5454
for i in range(0 , total_mtks):
5555
assert(not unique_keys_tracker._filter.contains('feature1key'+str(i)))

tests/tasks/test_unique_keys_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_normal_operation(self, mocker):
2323
unique_keys_tracker.track("key2", "split1")
2424

2525
unique_keys_sync = UniqueKeysSynchronizer(mocker.Mock(), unique_keys_tracker)
26-
task = UniqueKeysSyncTask(unique_keys_sync.SendAll, 1)
26+
task = UniqueKeysSyncTask(unique_keys_sync.send_all, 1)
2727
task.start()
2828
time.sleep(2)
2929
assert task.is_running()
@@ -44,7 +44,7 @@ def test_normal_operation(self, mocker):
4444
unique_keys_tracker.track("key2", "split1")
4545

4646
clear_filter_sync = ClearFilterSynchronizer(unique_keys_tracker)
47-
task = ClearFilterSyncTask(clear_filter_sync.clearAll, 1)
47+
task = ClearFilterSyncTask(clear_filter_sync.clear_all, 1)
4848
task.start()
4949
time.sleep(2)
5050
assert task.is_running()

0 commit comments

Comments
 (0)