changeset 8800:f78ccff15f43

celery: use kallithea.CELERY_APP.AsyncResult instead of celery.result import This is more spot-on and more correct.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 07 Nov 2020 01:52:19 +0100
parents d2d787d881db
children f9a2f5d6c486
files kallithea/controllers/admin/repos.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/repos.py	Fri Nov 06 18:52:08 2020 +0100
+++ b/kallithea/controllers/admin/repos.py	Sat Nov 07 01:52:19 2020 +0100
@@ -28,7 +28,6 @@
 import logging
 import traceback
 
-import celery.result
 import formencode
 from formencode import htmlfill
 from tg import request
@@ -172,7 +171,7 @@
 
         if task_id and task_id not in ['None']:
             if kallithea.CELERY_APP:
-                task_result = celery.result.AsyncResult(task_id, app=kallithea.CELERY_APP)
+                task_result = kallithea.CELERY_APP.AsyncResult(task_id)
                 if task_result.failed():
                     raise HTTPInternalServerError(task_result.traceback)