From: Michael Tremer Date: Wed, 22 Jan 2025 18:58:39 +0000 (+0000) Subject: jobs: Fix running the installcheck X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54e60df3c8267e4356125a4423d19ebe26a47458;p=pbs.git jobs: Fix running the installcheck Signed-off-by: Michael Tremer --- 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()