Changeset - f78ccff15f43
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 5 years ago 2020-11-07 01:52:19
mads@kiilerich.com
Grafted from: 084585c9a268
celery: use kallithea.CELERY_APP.AsyncResult instead of celery.result import

This is more spot-on and more correct.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/repos.py
Show inline comments
 
@@ -25,13 +25,12 @@ Original author and date, and relevant c
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import logging
 
import traceback
 

	
 
import celery.result
 
import formencode
 
from formencode import htmlfill
 
from tg import request
 
from tg import tmpl_context as c
 
from tg.i18n import ugettext as _
 
from webob.exc import HTTPForbidden, HTTPFound, HTTPInternalServerError, HTTPNotFound
 
@@ -169,13 +168,13 @@ class ReposController(BaseRepoController
 
    def repo_check(self, repo_name):
 
        c.repo = repo_name
 
        task_id = request.GET.get('task_id')
 

	
 
        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)
 

	
 
        repo = db.Repository.get_by_repo_name(repo_name)
 
        if repo and repo.repo_state == db.Repository.STATE_CREATED:
 
            if repo.clone_uri:
0 comments (0 inline, 0 general)