Configure the MBS backend code to use the correct SQLite database during local builds

This commit is contained in:
mprahl
2019-11-11 11:01:42 -05:00
parent 9c085a4d79
commit fc7ecb145f

View File

@@ -144,6 +144,9 @@ def build_module_locally(
os.remove(dbpath)
db.create_all()
# Reconfigure the backend database session registry to use the new the database location
db_session.remove()
db_session.configure(bind=db.session.bind)
params = {
"local_build": True,
@@ -158,8 +161,6 @@ def build_module_locally(
yaml_file_path = os.path.abspath(yaml_file)
from module_build_service.db_session import db_session
if offline:
import_builds_from_local_dnf_repos(platform_id)
load_local_builds(local_build_nsvs)