summaryrefslogtreecommitdiff
path: root/addons/web/http.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-09-30 16:44:28 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-09-30 16:44:28 +0200
commit4c87f75b2e38609549fade63a352e92fc1a57b5d (patch)
tree5d7fa3cefc49d8e0e6147b63099adce3be6ea457 /addons/web/http.py
parenta09c1f26f23cc7249c1afddd7c0ebdd43db81323 (diff)
parent11b5f393593e66df4e1809b4d672f805b1855146 (diff)
[FIX] problem with controllers reload
lp bug: https://launchpad.net/bugs/1233065 fixed bzr revid: nicolas.vanhoren@openerp.com-20130930144428-biwun9nh9y190fft
Diffstat (limited to 'addons/web/http.py')
-rw-r--r--addons/web/http.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/addons/web/http.py b/addons/web/http.py
index c8fabafd594..d3441790b43 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -865,8 +865,7 @@ class Root(object):
self.addons = {}
self.statics = {}
- self.db_routers = {}
- self.db_routers_lock = threading.Lock()
+ self.no_db_router = None
self.load_addons()
@@ -915,10 +914,7 @@ class Root(object):
db = request.db
if db:
- updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db)
- if updated:
- with self.db_routers_lock:
- del self.db_routers[db]
+ openerp.modules.registry.RegistryManager.check_registry_signaling(db)
with set_request(request):
self.find_handler()
@@ -1030,12 +1026,16 @@ class Root(object):
return routing_map
def get_db_router(self, db):
- with self.db_routers_lock:
- router = self.db_routers.get(db)
+ if db is None:
+ router = self.no_db_router
+ else:
+ router = getattr(openerp.modules.registry.RegistryManager.get(db), "werkzeug_http_router", None)
if not router:
router = self._build_router(db)
- with self.db_routers_lock:
- self.db_routers[db] = router
+ if db is None:
+ self.no_db_router = router
+ else:
+ openerp.modules.registry.RegistryManager.get(db).werkzeug_http_router = router
return router
def find_handler(self):