diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 1eaebe4bddc..99b3abb4d65 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -17,7 +17,7 @@ pidfile = '.gunicorn.pid' # Gunicorn recommends 2-4 x number_of_cpu_cores, but # you'll want to vary this a bit to find the best for your # particular work load. -workers = 1 +workers = 10 # Some application-wide initialization is needed. on_starting = openerp.wsgi.on_starting diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index 1eb96c3735b..2eadb2f1078 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -30,6 +30,7 @@ import urllib import zipfile import zipimport +import openerp import openerp.modules as addons import pooler import release @@ -344,6 +345,7 @@ class module(osv.osv): if to_install_ids: self.button_install(cr, uid, to_install_ids, context=context) + openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname) return dict(ACTION_DICT, name=_('Install')) def button_immediate_install(self, cr, uid, ids, context=None): diff --git a/openerp/modules/registry.py b/openerp/modules/registry.py index 26e153f233b..d79c56838cb 100644 --- a/openerp/modules/registry.py +++ b/openerp/modules/registry.py @@ -143,6 +143,7 @@ class RegistryManager(object): # must be reloaded. # The `base_cache_signaling sequence` indicates all caches must be # invalidated (i.e. cleared). + # TODO per registry base_registry_signaling_sequence = 1 base_cache_signaling_sequence = 1 @@ -279,10 +280,19 @@ class RegistryManager(object): cr = openerp.sql_db.db_connect(db_name).cursor() try: pass - # cr.execute("select nextval('base_registry_signaling')") - # cls.base_cache_signaling to = result + # cr.execute("select nextval('base_cache_signaling')") + # cls.base_cache_signaling_sequence to = result finally: cr.close() registry.reset_any_cache_cleared() + @classmethod + def signal_registry_change(cls, db_name): + cr = openerp.sql_db.db_connect(db_name).cursor() + try: + cr.execute("select nextval('base_registry_signaling')") + finally: + cr.close() + #cls.base_registry_signaling_sequence to = result + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: