You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:31:00 UTC
[buildstream] 06/19: Add workaround for buildqueue job_complete
direct callback
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch phil/ui-split-refactor
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit af619ea27e6da79d809f436c93a5ba8faa7f7738
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Tue Jun 18 12:34:22 2019 +0100
Add workaround for buildqueue job_complete direct callback
---
src/buildstream/_scheduler/scheduler.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py
index a9286d4..5bf0764 100644
--- a/src/buildstream/_scheduler/scheduler.py
+++ b/src/buildstream/_scheduler/scheduler.py
@@ -284,11 +284,14 @@ class Scheduler():
# queue (Queue): The Queue holding a complete job
# job (Job): The completed Job
# status (JobStatus): The status of the completed job
+ # process_jobs (bool): If the scheduler should also process the
+ # job, else just generate the notification
#
- def job_completed(self, job, status):
+ def job_completed(self, job, status, process_jobs=True):
- # Remove from the active jobs list
- self._active_jobs.remove(job)
+ if process_jobs:
+ # Remove from the active jobs list
+ self._active_jobs.remove(job)
if status == JobStatus.FAIL:
# If it's an elementjob, we want to compare against the failure messages
@@ -304,8 +307,9 @@ class Scheduler():
element=element)
self.message(message)
- # Now check for more jobs
- self._sched()
+ if process_jobs:
+ # Now check for more jobs
+ self._sched()
# check_cache_size():
#