Mercurial > kallithea
diff rhodecode/lib/celerylib/__init__.py @ 2299:e2dbdaf13562 beta
Don't clear dbsessions when celery_eager is turned on
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 17 May 2012 14:26:43 +0200 |
parents | 8ecfed1d8f8b |
children | edfff9f37916 9d4b80743a2a |
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/__init__.py Thu May 17 14:03:35 2012 +0200 +++ b/rhodecode/lib/celerylib/__init__.py Thu May 17 14:26:43 2012 +0200 @@ -35,7 +35,7 @@ from decorator import decorator from rhodecode.lib.vcs.utils.lazy import LazyProperty -from rhodecode import CELERY_ON +from rhodecode import CELERY_ON, CELERY_EAGER from rhodecode.lib.utils2 import str2bool, safe_str from rhodecode.lib.pidlock import DaemonLock, LockHeld from rhodecode.model import init_model @@ -122,7 +122,7 @@ ret = func(*fargs, **fkwargs) return ret finally: - if CELERY_ON: + if CELERY_ON and CELERY_EAGER is False: meta.Session.remove() return decorator(__wrapper, func)