mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 12:32:02 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -649,6 +649,11 @@ class ThreadedServer(CommonServer):
|
|||
|
||||
sql_db.close_all()
|
||||
|
||||
current_process = psutil.Process()
|
||||
children = current_process.children(recursive=False)
|
||||
for child in children:
|
||||
_logger.info('A child process was found, pid is %s, process may hang', child)
|
||||
|
||||
_logger.debug('--')
|
||||
logging.shutdown()
|
||||
|
||||
|
|
@ -1500,11 +1505,7 @@ def preload_registries(dbnames):
|
|||
try:
|
||||
with preload_profiler:
|
||||
threading.current_thread().dbname = dbname
|
||||
update_from_config = update_module = config['init'] or config['update'] or config['reinit']
|
||||
if not update_module:
|
||||
with sql_db.db_connect(dbname).cursor() as cr:
|
||||
cr.execute("SELECT 1 FROM ir_module_module WHERE state IN ('to remove', 'to upgrade', 'to install') FETCH FIRST 1 ROW ONLY")
|
||||
update_module = bool(cr.rowcount)
|
||||
update_module = config['init'] or config['update'] or config['reinit']
|
||||
|
||||
registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'], reinit_modules=config['reinit'])
|
||||
|
||||
|
|
@ -1513,7 +1514,7 @@ def preload_registries(dbnames):
|
|||
from odoo.tests import loader # noqa: PLC0415
|
||||
t0 = time.time()
|
||||
t0_sql = sql_db.sql_counter
|
||||
module_names = (registry.updated_modules if update_from_config else
|
||||
module_names = (registry.updated_modules if update_module else
|
||||
sorted(registry._init_modules))
|
||||
_logger.info("Starting post tests")
|
||||
tests_before = registry._assertion_report.testsRun
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue