[elbe-devel] [PATCH 16/22] elbepack: projectmanager: avoid cache indirection in rm_log()
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Aug 14 15:29:30 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 | 3 +--
elbepack/projectmanager.py | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index 447088d23c0c..e2e8723a3c23 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -328,8 +328,7 @@ class ESoap (ServiceBase):
@rpc(String)
@authenticated_uid
def rm_log(self, uid, builddir):
- self.app.pm.open_project(uid, builddir)
- self.app.pm.rm_log(uid)
+ self.app.pm.rm_log(uid, builddir)
@rpc(String, _returns=String.customize(max_occurs='unbounded'))
@authenticated_uid
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 261939304b03..78176ca9bedc 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -264,8 +264,8 @@ class ProjectManager:
ep = self._get_current_project(userid)
self.worker.enqueue(GenUpdateJob(ep, base_version))
- def rm_log(self, userid):
- ep = self._get_current_project(userid)
+ def rm_log(self, userid, builddir):
+ ep = self.open_project(userid, builddir)
with open(os.path.join(ep.builddir, 'log.txt'), 'wb', 0):
pass
--
2.46.0
More information about the elbe-devel
mailing list