diff --git a/.gitignore b/.gitignore index 0a51be7b118..2893b158466 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ htmlcov/ coverage.xml test.db pip-wheel-metadata/ +.vscode/ diff --git a/celery/app/task.py b/celery/app/task.py index 86c4e727d49..b521907c335 100644 --- a/celery/app/task.py +++ b/celery/app/task.py @@ -1004,6 +1004,12 @@ def add_trail(self, result): return result def push_request(self, *args, **kwargs): + # indico + # we want access to args & kwargs in our copied context + # TODO: consider making a copy - need to make sure arguments are small enough + # to avoid dup mem. + self.request.args = args + self.request.kwargs = kwargs self.request_stack.push(Context(*args, **kwargs)) def pop_request(self): diff --git a/celery/backends/base.py b/celery/backends/base.py index 28e5b2a4d6b..97d4ca347a0 100644 --- a/celery/backends/base.py +++ b/celery/backends/base.py @@ -238,6 +238,12 @@ def chord_error_from_stack(self, callback, exc=None): # need below import for test for some crazy reason from celery import group # pylint: disable app = self.app + + # indico + # Revoke causes callbacks id to be None + if callback.id is None and callback.tasks: + callback.id = callback.tasks[0].id + try: backend = app._tasks[callback.task].backend except KeyError: