[elbe-devel] [PATCH 06/22] elbepack: projectmanager: avoid cache indirection in build_project()
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Aug 14 15:29:20 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, 4 insertions(+), 5 deletions(-)
diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index bb58e0780b8a..f7e47aedcfae 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -200,9 +200,7 @@ class ESoap (ServiceBase):
@authenticated_uid
def build(self, uid, builddir, build_bin, build_src, skip_pbuilder):
- self.app.pm.open_project(uid, builddir)
- self.app.pm.build_current_project(uid, build_bin, build_src,
- skip_pbuilder)
+ self.app.pm.build_project(uid, builddir, build_bin, build_src, skip_pbuilder)
@rpc(String, Boolean, Boolean, String)
@authenticated_uid
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 0d08a596e1d7..84ff2cbcb7a0 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -175,14 +175,15 @@ class ProjectManager:
# Make db reload the xml file
self.db.set_xml(ep.builddir, None)
- def build_current_project(
+ def build_project(
self,
userid,
+ builddir,
build_bin,
build_src,
skip_pbuilder):
+ ep = self.open_project(userid, builddir, allow_busy=False)
with self.lock:
- ep = self._get_current_project(userid, allow_busy=False)
self.worker.enqueue(BuildJob(ep, build_bin, build_src,
skip_pbuilder))
--
2.46.0
More information about the elbe-devel
mailing list