... as in the missing retries_left configuration.
- Also add test on that function.
Related D608#inline-2891
Differential D613
swh.scheduler.utils: Allow to add more task information ardumont on Oct 26 2018, 8:36 PM. Authored by
Details ... as in the missing retries_left configuration.
Related D608#inline-2891 tox
Diff Detail
Event TimelineComment Actions Build is green Comment Actions Build is green Comment Actions As there is no copy of kwargs, the new for loop also modifies task['arguments']['kwargs']. Although this is the correct behavior, it's not obvious it happens when reading the code. I suggest rewriting the function like this: task_extra = {} for extra_key in ['priority', 'retries_left']: if extra_key in kwargs: extra_val = kwargs.pop(extra_key) task_extra[extra_key] = extra_val task = { 'policy': policy, # ... } task.update(task_extra) Comment Actions Build is green |