Mercurial > kallithea
diff rhodecode/lib/celerylib/tasks.py @ 555:03676d39dd0a
added fault tolerant case when celeryconfig is not present in the directory.
small form fixes,
and websetup default app title and admin name
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Oct 2010 18:26:59 +0200 |
parents | f99075170eb4 |
children | bc4633a41967 |
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/tasks.py Wed Oct 06 18:04:27 2010 +0200 +++ b/rhodecode/lib/celerylib/tasks.py Wed Oct 06 18:26:59 2010 +0200 @@ -1,6 +1,5 @@ from celery.decorators import task -from celery.task.sets import subtask -from celeryconfig import PYLONS_CONFIG as config + from operator import itemgetter from pylons.i18n.translation import _ from rhodecode.lib.celerylib import run_task, locked_task @@ -12,6 +11,14 @@ import json import traceback +try: + from celeryconfig import PYLONS_CONFIG as config +except ImportError: + #if celeryconfig is not present let's just load our pylons + #config instead + from pylons import config + + __all__ = ['whoosh_index', 'get_commits_stats', 'reset_user_password', 'send_email']