[FIX] when runing in prefork mode, empty connection pool *after* the registry preloading

bzr revid: chs@openerp.com-20140422120648-2np8izn19z97e4iy
This commit is contained in:
Christophe Simonis 2014-04-22 14:06:48 +02:00
parent f756fa671e
commit ada7facefe
1 changed files with 3 additions and 2 deletions

View File

@ -559,8 +559,6 @@ class PreforkServer(CommonServer):
raise raise
def start(self): def start(self):
# Empty the cursor pool, we dont want them to be shared among forked workers.
openerp.sql_db.close_all()
# wakeup pipe, python doesnt throw EINTR when a syscall is interrupted # wakeup pipe, python doesnt throw EINTR when a syscall is interrupted
# by a signal simulating a pseudo SA_RESTART. We write to a pipe in the # by a signal simulating a pseudo SA_RESTART. We write to a pipe in the
# signal handler to overcome this behaviour # signal handler to overcome this behaviour
@ -609,6 +607,9 @@ class PreforkServer(CommonServer):
self.stop() self.stop()
return rc return rc
# Empty the cursor pool, we dont want them to be shared among forked workers.
openerp.sql_db.close_all()
_logger.debug("Multiprocess starting") _logger.debug("Multiprocess starting")
while 1: while 1:
try: try: