Tristan Van Berkom pushed to branch master at BuildStream / buildstream
Commits:
-
1443c542
by Tristan Van Berkom at 2019-01-22T16:26:56Z
-
6e5c9987
by Tristan Van Berkom at 2019-01-22T17:14:50Z
2 changed files:
Changes:
| ... | ... | @@ -184,6 +184,16 @@ class Job(): |
| 184 | 184 |
|
| 185 | 185 |
self._terminated = True
|
| 186 | 186 |
|
| 187 |
+ # get_terminated()
|
|
| 188 |
+ #
|
|
| 189 |
+ # Check if a job has been terminated.
|
|
| 190 |
+ #
|
|
| 191 |
+ # Returns:
|
|
| 192 |
+ # (bool): True in the main process if Job.terminate() was called.
|
|
| 193 |
+ #
|
|
| 194 |
+ def get_terminated(self):
|
|
| 195 |
+ return self._terminated
|
|
| 196 |
+ |
|
| 187 | 197 |
# terminate_wait()
|
| 188 | 198 |
#
|
| 189 | 199 |
# Wait for terminated jobs to complete
|
| ... | ... | @@ -305,7 +305,7 @@ class Queue(): |
| 305 | 305 |
self._done_queue.append(element)
|
| 306 | 306 |
|
| 307 | 307 |
# These lists are for bookkeeping purposes for the UI and logging.
|
| 308 |
- if status == JobStatus.SKIPPED:
|
|
| 308 |
+ if status == JobStatus.SKIPPED or job.get_terminated():
|
|
| 309 | 309 |
self.skipped_elements.append(element)
|
| 310 | 310 |
elif status == JobStatus.OK:
|
| 311 | 311 |
self.processed_elements.append(element)
|
