Issue #2768
Updated by bizhang over 7 years ago
When a task is kicked off I would expect it to populate the worker foreign key when the task is ran [0] I would expect this to be updated in the apply_async function [1], and I would expect this to be updated for tasks kicked off with apply_async and apply_async_with_reservations. <pre>TaskStatus.objects.create</pre> `TaskStatus.objects.create` will probably have to be refactored to <pre>TaskStatus.objects.update_or_create</pre> `TaskStatus.objects.update_or_create` to update apply_async_with_reservations tasks when they are routed to the worker [2] [0] https://github.com/pulp/pulp/blob/3.0-dev/platform/pulp/app/models/task.py#L158 [1] https://github.com/pulp/pulp/blob/3.0-dev/platform/pulp/tasking/tasks.py#L243 [2] https://docs.djangoproject.com/en/1.11/ref/models/querysets/#update-or-create