summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-18 18:54:26 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-18 18:54:26 +0200
commit021d0e6a98bb9baa0d554d4e8b5717c7893a7641 (patch)
tree8d22beaa1ef2c4cb3c14896645554f646f0ddc9d /odoo/modules
parent40e74240e83f680bbdd9624c14edef2201d96d17 (diff)
parentcabe0951af2e0a0fcad47fa7a9fe2ffa5e8701cf (diff)
[MERGE] forward port branch saas-14 up to cabe0951af2
Diffstat (limited to 'odoo/modules')
-rw-r--r--odoo/modules/registry.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py
index ffa3c58d52a..7428e203c5a 100644
--- a/odoo/modules/registry.py
+++ b/odoo/modules/registry.py
@@ -130,7 +130,7 @@ class Registry(Mapping):
# Indicates that the registry is
self.ready = False
- # Inter-process signaling (used only when odoo.multi_process is True):
+ # Inter-process signaling:
# The `base_registry_signaling` sequence indicates the whole registry
# must be reloaded.
# The `base_cache_signaling sequence` indicates all caches must be
@@ -360,7 +360,7 @@ class Registry(Mapping):
def setup_signaling(self):
""" Setup the inter-process signaling on this registry. """
- if not odoo.multi_process:
+ if self.in_test_mode():
return
with self.cursor() as cr:
@@ -386,7 +386,7 @@ class Registry(Mapping):
""" Check whether the registry has changed, and performs all necessary
operations to update the registry. Return an up-to-date registry.
"""
- if not odoo.multi_process:
+ if self.in_test_mode():
return self
with closing(self.cursor()) as cr:
@@ -412,7 +412,7 @@ class Registry(Mapping):
def signal_registry_change(self):
""" Notifies other processes that the registry has changed. """
- if odoo.multi_process:
+ if not self.in_test_mode():
_logger.info("Registry changed, signaling through the database")
with closing(self.cursor()) as cr:
cr.execute("select nextval('base_registry_signaling')")
@@ -420,7 +420,7 @@ class Registry(Mapping):
def signal_caches_change(self):
""" Notifies other processes if caches have been invalidated. """
- if odoo.multi_process and self.cache_cleared:
+ if self.cache_cleared and not self.in_test_mode():
# signal it through the database to other processes
_logger.info("At least one model cache has been invalidated, signaling through the database.")
with closing(self.cursor()) as cr: