# HG changeset patch # User Marcin Kuzminski # Date 2012-01-20 06:14:32 # Node ID a69573cfcb00f45996e8e1247e6847f25ca19378 # Parent cd8a7e3698bc0cff5c7f76566de1f306b9994655 cleanup task session only if celery is on diff --git a/rhodecode/lib/celerylib/__init__.py b/rhodecode/lib/celerylib/__init__.py --- a/rhodecode/lib/celerylib/__init__.py +++ b/rhodecode/lib/celerylib/__init__.py @@ -122,6 +122,7 @@ def dbsession(func): ret = func(*fargs, **fkwargs) return ret finally: - meta.Session.remove() + if CELERY_ON: + meta.Session.remove() return decorator(__wrapper, func)