@@ -377,7 +377,9 @@ def _parse_split(self, split, block_until_ready=False):
377
377
split ['name' ], split ['seed' ], split ['killed' ],
378
378
split ['defaultTreatment' ], split ['trafficTypeName' ],
379
379
split ['status' ], split ['changeNumber' ],
380
- segment_cache = self ._segment_cache , algo = split .get ('algo' )
380
+ segment_cache = self ._segment_cache , algo = split .get ('algo' ),
381
+ traffic_allocation = split .get ('trafficAllocation' ),
382
+ traffic_allocation_seed = split .get ('trafficAllocationSeed' )
381
383
)
382
384
383
385
def _parse_matcher_in_segment (self , partial_split , matcher , block_until_ready = False , * args ,
@@ -389,7 +391,9 @@ def _parse_matcher_in_segment(self, partial_split, matcher, block_until_ready=Fa
389
391
return delegate
390
392
391
393
class UWSGISplit (Split ):
392
- def __init__ (self , name , seed , killed , default_treatment , traffic_type_name , status , change_number , conditions = None , segment_cache = None , algo = None ):
394
+ def __init__ (self , name , seed , killed , default_treatment , traffic_type_name , status , change_number , conditions = None , segment_cache = None , algo = None ,
395
+ traffic_allocation = None ,
396
+ traffic_allocation_seed = None ):
393
397
"""A split implementation that mantains a reference to the segment cache so segments can
394
398
be easily pickled and unpickled.
395
399
:param name: Name of the feature
@@ -407,7 +411,8 @@ def __init__(self, name, seed, killed, default_treatment, traffic_type_name, sta
407
411
"""
408
412
super (UWSGISplit , self ).__init__ (
409
413
name , seed , killed , default_treatment , traffic_type_name , status ,
410
- change_number , conditions , algo )
414
+ change_number , conditions , algo , traffic_allocation ,
415
+ traffic_allocation_seed )
411
416
self ._segment_cache = segment_cache
412
417
413
418
@property
0 commit comments