зеркало из https://github.com/mozilla/taar.git
Added more explicit logging for method dispatch to run a particular intervention
This commit is contained in:
Родитель
f5203972dc
Коммит
54340eca10
|
@ -141,8 +141,11 @@ class RecommendationManager:
|
|||
|
||||
# Select recommendation output based on extra_data['branch']
|
||||
branch_selector = extra_data.get('branch', INTERVENTION_CONTROL)
|
||||
|
||||
method_selector = branch_selector.replace('-', '_')
|
||||
|
||||
method_name = 'recommend_{}'.format(method_selector)
|
||||
|
||||
self.logger.info("Dispatching to method [{}]".format(method_name))
|
||||
branch_method = getattr(self, 'recommend_%s' % method_selector)
|
||||
return branch_method(client_info, client_id, limit, extra_data)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче