##// END OF EJS Templates
Don't clear dbsessions when celery_eager is turned on
marcink -
r2299:e2dbdaf1 beta
parent child Browse files
Show More
@@ -19,6 +19,8 b' news'
19 19 fixes
20 20 +++++
21 21
22
23
22 24 1.3.6 (**2012-05-17**)
23 25 ----------------------
24 26
@@ -36,6 +38,7 b' fixes'
36 38 - fixed __future__ import error on rcextensions
37 39 - made simplejson required lib for speedup on JSON encoding
38 40 - fixes #449 bad regex could get more than revisions from parsing history
41 - don't clear DB session when CELERY_EAGER is turned ON
39 42
40 43 1.3.5 (**2012-05-10**)
41 44 ----------------------
@@ -89,6 +89,7 b' BACKENDS = {'
89 89 }
90 90
91 91 CELERY_ON = False
92 CELERY_EAGER = False
92 93
93 94 # link to config for pylons
94 95 CONFIG = {}
@@ -47,6 +47,7 b' def load_environment(global_conf, app_co'
47 47
48 48 # store some globals into rhodecode
49 49 rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
50 rhodecode.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
50 51
51 52 config['routes.map'] = make_map(config)
52 53 config['pylons.app_globals'] = app_globals.Globals(config)
@@ -35,7 +35,7 b' from hashlib import md5'
35 35 from decorator import decorator
36 36
37 37 from rhodecode.lib.vcs.utils.lazy import LazyProperty
38 from rhodecode import CELERY_ON
38 from rhodecode import CELERY_ON, CELERY_EAGER
39 39 from rhodecode.lib.utils2 import str2bool, safe_str
40 40 from rhodecode.lib.pidlock import DaemonLock, LockHeld
41 41 from rhodecode.model import init_model
@@ -122,7 +122,7 b' def dbsession(func):'
122 122 ret = func(*fargs, **fkwargs)
123 123 return ret
124 124 finally:
125 if CELERY_ON:
125 if CELERY_ON and CELERY_EAGER is False:
126 126 meta.Session.remove()
127 127
128 128 return decorator(__wrapper, func)
@@ -39,7 +39,7 b' from pylons.i18n.translation import _'
39 39
40 40 from rhodecode.lib.vcs import get_backend
41 41
42 from rhodecode import CELERY_ON
42 from rhodecode import CELERY_ON, CELERY_EAGER
43 43 from rhodecode.lib.utils2 import safe_str
44 44 from rhodecode.lib.celerylib import run_task, locked_task, dbsession, \
45 45 str2bool, __get_lockkey, LockHeld, DaemonLock, get_session
General Comments 0
You need to be logged in to leave comments. Login now