Tristan Van Berkom pushed to branch tristan/one-cache-size-job at BuildStream / buildstream
Commits:
-
fb2f5a0f
by Tristan Van Berkom at 2019-01-07T17:55:23Z
2 changed files:
Changes:
... | ... | @@ -132,7 +132,6 @@ class Job(): |
132 | 132 |
self._max_retries = max_retries # Maximum number of automatic retries
|
133 | 133 |
self._result = None # Return value of child action in the parent
|
134 | 134 |
self._tries = 0 # Try count, for retryable jobs
|
135 |
- self._skipped_flag = False # Indicate whether the job was skipped.
|
|
136 | 135 |
self._terminated = False # Whether this job has been explicitly terminated
|
137 | 136 |
|
138 | 137 |
# If False, a retry will not be attempted regardless of whether _tries is less than _max_retries.
|
... | ... | @@ -289,18 +288,6 @@ class Job(): |
289 | 288 |
def set_task_id(self, task_id):
|
290 | 289 |
self._task_id = task_id
|
291 | 290 |
|
292 |
- # skipped
|
|
293 |
- #
|
|
294 |
- # This will evaluate to True if the job was skipped
|
|
295 |
- # during processing, or if it was forcefully terminated.
|
|
296 |
- #
|
|
297 |
- # Returns:
|
|
298 |
- # (bool): Whether the job should appear as skipped
|
|
299 |
- #
|
|
300 |
- @property
|
|
301 |
- def skipped(self):
|
|
302 |
- return self._skipped_flag or self._terminated
|
|
303 |
- |
|
304 | 291 |
#######################################################
|
305 | 292 |
# Abstract Methods #
|
306 | 293 |
#######################################################
|
... | ... | @@ -578,9 +565,6 @@ class Job(): |
578 | 565 |
#
|
579 | 566 |
self._retry_flag = returncode == RC_FAIL
|
580 | 567 |
|
581 |
- # Set the flag to alert Queue that this job skipped.
|
|
582 |
- self._skipped_flag = returncode == RC_SKIPPED
|
|
583 |
- |
|
584 | 568 |
if self._retry_flag and (self._tries <= self._max_retries) and not self._scheduler.terminated:
|
585 | 569 |
self.spawn()
|
586 | 570 |
return
|
... | ... | @@ -331,10 +331,8 @@ class Queue(): |
331 | 331 |
# All jobs get placed on the done queue for later processing.
|
332 | 332 |
self._done_queue.append(job)
|
333 | 333 |
|
334 |
- # A Job can be skipped whether or not it has failed,
|
|
335 |
- # we want to only bookkeep them as processed or failed
|
|
336 |
- # if they are not skipped.
|
|
337 |
- if job.skipped:
|
|
334 |
+ # These lists are for bookkeeping purposes for the UI and logging.
|
|
335 |
+ if status == JobStatus.SKIPPED:
|
|
338 | 336 |
self.skipped_elements.append(element)
|
339 | 337 |
elif status == JobStatus.OK:
|
340 | 338 |
self.processed_elements.append(element)
|