From: Michael Tremer Date: Mon, 22 May 2023 20:24:29 +0000 (+0000) Subject: sources: Run dist() in a separate thread X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84c48295c81e8e8e227e6bd41e772232aaae3951;p=pbs.git sources: Run dist() in a separate thread Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/sources.py b/src/buildservice/sources.py index a1992b83..d2469e44 100644 --- a/src/buildservice/sources.py +++ b/src/buildservice/sources.py @@ -799,8 +799,8 @@ class Job(base.DataObject): with self.source.repo.pakfire() as p: log.debug("Running dist for %s..." % makefile) - # Run dist() - file = p.dist(makefile, target) + # Run dist() in a separate thread + file = await asyncio.to_thread(p.dist, makefile, target) # Upload the file upload = await self.backend.uploads.create_from_local(file)