Skip to content

Commit c45d15b

Browse files
committed
update vars sync.unique_keys
1 parent d683efa commit c45d15b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

splitio/sync/unique_keys.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ def send_all(self):
3030
def _split_cache_to_bulks(self, cache):
3131
"""
3232
Split the current unique keys dictionary into seperate dictionaries,
33-
each with the size of max_bulk_size. Overflow the last feature set() to new unique keys dictionary.
33+
each with the size of max_bulk_size. Overflow the last feature_flag set() to new unique keys dictionary.
3434
3535
:return: array of unique keys dictionaries
36-
:rtype: [Dict{'feature1': set(), 'feature2': set(), .. }]
36+
:rtype: [Dict{'feature_flag1': set(), 'feature_flag2': set(), .. }]
3737
"""
3838
bulks = []
3939
bulk = {}
4040
total_size = 0
41-
for feature in cache:
42-
total_size += len(cache[feature])
41+
for feature_flag in cache:
42+
total_size += len(cache[feature_flag])
4343
if total_size > self._max_bulk_size:
44-
keys_list = list(cache[feature])
44+
keys_list = list(cache[feature_flag])
4545
chunk_list = self._chunks(keys_list)
4646
if bulk != {}:
4747
bulks.append(bulk)
4848
for bulk_keys in chunk_list:
49-
bulk[feature] = set(bulk_keys)
49+
bulk[feature_flag] = set(bulk_keys)
5050
bulks.append(bulk)
5151
bulk = {}
5252
else:
53-
bulk[feature] = self.cache[feature]
53+
bulk[feature_flag] = self.cache[feature_flag]
5454
if total_size != 0 and bulk != {}:
5555
bulks.append(bulk)
5656

0 commit comments

Comments
 (0)