diff --git a/kallithea/controllers/admin/repos.py b/kallithea/controllers/admin/repos.py --- a/kallithea/controllers/admin/repos.py +++ b/kallithea/controllers/admin/repos.py @@ -35,6 +35,7 @@ from tg import tmpl_context as c from tg.i18n import ugettext as _ from webob.exc import HTTPForbidden, HTTPFound, HTTPInternalServerError, HTTPNotFound +import kallithea from kallithea.config.routing import url from kallithea.lib import helpers as h from kallithea.lib.auth import HasPermissionAny, HasRepoPermissionLevelDecorator, LoginRequired, NotAnonymous @@ -183,7 +184,7 @@ class ReposController(BaseRepoController if task_id and task_id not in ['None']: from kallithea.lib import celerypylons if kallithea.CELERY_APP: - task_result = celerypylons.result.AsyncResult(task_id) + task_result = celerypylons.result.AsyncResult(task_id, app=kallithea.CELERY_APP) if task_result.failed(): raise HTTPInternalServerError(task_result.traceback) diff --git a/kallithea/lib/celerylib/__init__.py b/kallithea/lib/celerylib/__init__.py --- a/kallithea/lib/celerylib/__init__.py +++ b/kallithea/lib/celerylib/__init__.py @@ -68,8 +68,7 @@ def task(f_org): finally: log.info('executed %s task', f_org.__name__) f_async.__name__ = f_org.__name__ - from kallithea.lib import celerypylons - runner = celerypylons.task(ignore_result=True)(f_async) + runner = kallithea.CELERY_APP.task(ignore_result=True)(f_async) def f_wrapped(*args, **kwargs): t = runner.apply_async(args=args, kwargs=kwargs)