File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments