comparison rhodecode/lib/celerylib/__init__.py @ 2524:9d4b80743a2a beta

New repo model create function - fixed some sessions calls
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 01 Jul 2012 15:47:54 +0200
parents e2dbdaf13562
children 63e58ef80ef1 301268606429
comparison
equal deleted inserted replaced
2523:788ae4f7d8df 2524:9d4b80743a2a
110 110
111 def get_session(): 111 def get_session():
112 if CELERY_ON: 112 if CELERY_ON:
113 engine = engine_from_config(config, 'sqlalchemy.db1.') 113 engine = engine_from_config(config, 'sqlalchemy.db1.')
114 init_model(engine) 114 init_model(engine)
115 sa = meta.Session 115 sa = meta.Session()
116 return sa 116 return sa
117 117
118 118
119 def dbsession(func): 119 def dbsession(func):
120 def __wrapper(func, *fargs, **fkwargs): 120 def __wrapper(func, *fargs, **fkwargs):