]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Run dispatch after abort
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Apr 2023 10:24:59 +0000 (10:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Apr 2023 10:24:59 +0000 (10:24 +0000)
The builder might have lost the connection so it won't get the abort
message.

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

index da94fe42cb7b6aa57e16d9ec3de7ef3981c5c397..4872140902f3cae1efdd20a5e6e3f1545e6a2f01 100644 (file)
@@ -511,6 +511,9 @@ class Job(base.DataObject):
                if user:
                        self._set_attribute("aborted_by", user)
 
+               # Try to dispatch more jobs in the background
+               self.backend.run_task(self.backend.jobs.queue.dispatch)
+
        def is_aborted(self):
                """
                        Returns True if this job has been aborted