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