File: 0023-celery-no-empty-id.patch

package info (click to toggle)
pagure 5.14.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,008 kB
  • sloc: python: 125,295; javascript: 22,012; makefile: 208; sh: 191
file content (19 lines) | stat: -rw-r--r-- 600 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Don't pass empty task_id to Celery

fails in celery 5.3.0+

Author: Klaus Koder
Origin: upstream
Forwarded: not-needed

--- a/pagure/lib/tasks_utils.py
+++ b/pagure/lib/tasks_utils.py
@@ -28,7 +28,7 @@ def pagure_task(function):
         """ Decorated function, actually does the work. """
         if self is not None:
             try:
-                self.update_state(state="RUNNING")
+                self.update_state(self=self, state="RUNNING")
             except TypeError:
                 pass
         session = pagure.lib.model_base.create_session(pagure_config["DB_URL"])