From ae45df93a40c4961b2194b80b9aabc78057cecab Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 9 Dec 2012 20:05:43 +0100 Subject: [PATCH] misc bzr revid: al@openerp.com-20121209190543-83hmvyfcu1af7wiv --- openerp/modules/registry.py | 10 +--------- openerp/service/cron.py | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/openerp/modules/registry.py b/openerp/modules/registry.py index 1cfa10eb42e..d898cc7e8db 100644 --- a/openerp/modules/registry.py +++ b/openerp/modules/registry.py @@ -240,15 +240,7 @@ class RegistryManager(object): @classmethod def delete(cls, db_name): - """Delete the registry linked to a given database. - - This also cleans the associated caches. For good measure this also - cancels the associated cron job. But please note that the cron job can - be running and take some time before ending, and that you should not - remove a registry if it can still be used by some thread. So it might - be necessary to call yourself openerp.cron.Agent.cancel(db_name) and - and join (i.e. wait for) the thread. - """ + """Delete the registry linked to a given database. """ with cls.registries_lock: if db_name in cls.registries: cls.registries[db_name].clear_caches() diff --git a/openerp/service/cron.py b/openerp/service/cron.py index 077d19bbc71..337583b65e4 100644 --- a/openerp/service/cron.py +++ b/openerp/service/cron.py @@ -63,7 +63,7 @@ def start_service(): for i in range(openerp.tools.config['max_cron_threads']): def target(): cron_runner(i) - t = threading.Thread(target=target, name="openerp.service.cron.cron_runner%d" % i) + t = threading.Thread(target=target, name="openerp.service.cron.cron%d" % i) t.setDaemon(True) t.start() _logger.debug("cron%d started!" % i)