Skip to content

Commit

Permalink
refactor: move using attr from _get_result_meta to _store_result
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitPhulera committed Jun 3, 2022
1 parent 36aeaeb commit bde3eef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions django_celery_results/backends/database.py
Expand Up @@ -54,14 +54,13 @@ def exception_safe_to_retry(self, exc):
return True
return False

def _get_result_meta(self, request, traceback, using):
def _get_result_meta(self, request, traceback):
extended_props = {
'periodic_task_name': None,
'task_args': None,
'task_kwargs': None,
'task_name': None,
'traceback': None,
'using': None,
'worker': None,
}
if request and self.app.conf.find_value_for_key('extended', 'result'):
Expand Down Expand Up @@ -95,7 +94,6 @@ def _get_result_meta(self, request, traceback, using):
'task_kwargs': task_kwargs,
'task_name': getattr(request, 'task', None),
'traceback': traceback,
'using': using,
'worker': getattr(request, 'hostname', None),
})

Expand Down Expand Up @@ -124,6 +122,7 @@ def _store_result(
'status': status,
'task_id': task_id,
'traceback': traceback,
'using': using,
}

task_props.update(
Expand Down

0 comments on commit bde3eef

Please sign in to comment.