[elbe-devel] [PATCH 05/22] elbepack: projectmanager: avoid cache indirection in set_upload_cdrom()
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Aug 14 15:29:19 CEST 2024
The target project is already available, there is no need for the
indirection refetching it from the cache.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/daemons/soap/esoap.py | 4 +---
elbepack/projectmanager.py | 5 ++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index aac1c78db937..bb58e0780b8a 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -244,9 +244,7 @@ class ESoap (ServiceBase):
@rpc(String)
@authenticated_uid
def finish_cdrom(self, uid, builddir):
- self.app.pm.open_project(
- uid, builddir, url_validation=ValidationMode.NO_CHECK)
- self.app.pm.set_current_project_upload_cdrom(uid)
+ self.app.pm.set_upload_cdrom(uid, builddir, ValidationMode.NO_CHECK)
@rpc(String)
@authenticated_uid
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index aa210697f156..0d08a596e1d7 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -163,10 +163,9 @@ class ProjectManager:
with self.lock:
self.db.set_xml(builddir, xml_file)
- def set_current_project_upload_cdrom(self, userid):
+ def set_upload_cdrom(self, userid, builddir, url_validation):
+ ep = self.open_project(userid, builddir, url_validation, allow_busy=False)
with self.lock:
- ep = self._get_current_project(userid, allow_busy=False)
-
ep.xml.set_cdrom_mirror(
path.join(
ep.builddir,
--
2.46.0
More information about the elbe-devel
mailing list