From 54e60df3c8267e4356125a4423d19ebe26a47458 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 22 Jan 2025 18:58:39 +0000 Subject: [PATCH] jobs: Fix running the installcheck Signed-off-by: Michael Tremer --- src/buildservice/jobs.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 37e7ca3c..99474e52 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -123,12 +123,18 @@ class Jobs(base.Object): """ Called to launch all given jobs """ + repos = {} + # Group jobs by their build repository - repos = misc.group(jobs, lambda job: job.build.build_repo) + for job in jobs: + try: + repos[job.build.build_repo].append(job) + except KeyError: + repos[job.build.build_repo] = [job] - # Run the dependency check for each repository concurrently - for repo in repos: - await repo.installcheck(repos[repo]) + # Run the dependency check for all jobs + for repo, jobs in repos.items(): + await repo.installcheck(jobs) # Request dispatch await self.backend.jobs.queue.dispatch() -- 2.47.3