def load_marked_modules(cr, graph, states, force, progressdict, report, loaded_modules, perform_checks, upg_registry): """Loads modules marked with ``states``, adding them to ``graph`` and ``loaded_modules`` and returns a list of installed/upgraded modules.""" processed_modules = [] while True: cr.execute("SELECT name from ir_module_module WHERE state IN %s", (tuple(states), )) module_list = [name for (name, ) in cr.fetchall() if name not in graph] module_list = openupgrade_loading.add_module_dependencies( cr, module_list) if not module_list: break graph.add_modules(cr, module_list, force) _logger.debug('Updating graph with %d more modules', len(module_list)) loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks, upg_registry=upg_registry) processed_modules.extend(processed) loaded_modules.extend(loaded) if not processed: break return processed_modules
def load_marked_modules(cr, graph, states, force, progressdict, report, loaded_modules, perform_checks, upg_registry): """Loads modules marked with ``states``, adding them to ``graph`` and ``loaded_modules`` and returns a list of installed/upgraded modules.""" processed_modules = [] while True: cr.execute("SELECT name from ir_module_module WHERE state IN %s" ,(tuple(states),)) module_list = [name for (name,) in cr.fetchall() if name not in graph] module_list = openupgrade_loading.add_module_dependencies(cr, module_list) graph.add_modules(cr, module_list, force) _logger.debug('Updating graph with %d more modules', len(module_list)) loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks, upg_registry=upg_registry) processed_modules.extend(processed) loaded_modules.extend(loaded) if not processed: break return processed_modules