]> git.ipfire.org Git - pbs.git/commitdiff
repos: Run fewer installchecks
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 14:10:02 +0000 (14:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 14:10:02 +0000 (14:10 +0000)
Only run this for jobs that have previously failed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/repository.py

index e1b0d2376c66b7fd2ef77b466beb93bf5f6b8699..e8829d6d089ce9b7fd1c9a0e17b2aa8f5e4a465e 100644 (file)
@@ -880,8 +880,12 @@ class Repository(base.DataObject):
                """
                log.debug("%s: Relaunching pending jobs" % self)
 
+               # Find all jobs that previously failed their installation check
+               jobs = [job for job in self.pending_jobs if job.is_pending(installcheck=False)]
+
                # Perform installcheck on all pending jobs
-               await self.installcheck(self.pending_jobs)
+               if jobs:
+                       await self.installcheck(jobs)
 
                # Request dispatch
                await self.backend.jobs.queue.dispatch()