summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-07 12:55:23 -0500
committerAbderrahim Kitouni <a.kitouni@gmail.com>2019-04-12 14:58:11 +0000
commit5b70efceaf8786a06d60e566b9efae7604d0e96c (patch)
tree547236f1be47891d2d3ce0f402c6ab04471b1462
parenta213042aada510f221c1b7c3ffdeb3beddb500a7 (diff)
downloadbuildstream-5b70efceaf8786a06d60e566b9efae7604d0e96c.tar.gz
_scheduler/jobs/job.py: Removed 'skipped' property
This is redundant now that we report it through the JobStatus.
-rw-r--r--buildstream/_scheduler/jobs/job.py16
-rw-r--r--buildstream/_scheduler/queues/queue.py6
2 files changed, 2 insertions, 20 deletions
diff --git a/buildstream/_scheduler/jobs/job.py b/buildstream/_scheduler/jobs/job.py
index aa7d6a5a7..8e0cfc208 100644
--- a/buildstream/_scheduler/jobs/job.py
+++ b/buildstream/_scheduler/jobs/job.py
@@ -132,7 +132,6 @@ class Job():
self._max_retries = max_retries # Maximum number of automatic retries
self._result = None # Return value of child action in the parent
self._tries = 0 # Try count, for retryable jobs
- self._skipped_flag = False # Indicate whether the job was skipped.
self._terminated = False # Whether this job has been explicitly terminated
# If False, a retry will not be attempted regardless of whether _tries is less than _max_retries.
@@ -287,18 +286,6 @@ class Job():
def set_task_id(self, task_id):
self._task_id = task_id
- # skipped
- #
- # This will evaluate to True if the job was skipped
- # during processing, or if it was forcefully terminated.
- #
- # Returns:
- # (bool): Whether the job should appear as skipped
- #
- @property
- def skipped(self):
- return self._skipped_flag or self._terminated
-
#######################################################
# Abstract Methods #
#######################################################
@@ -576,9 +563,6 @@ class Job():
#
self._retry_flag = returncode == RC_FAIL
- # Set the flag to alert Queue that this job skipped.
- self._skipped_flag = returncode == RC_SKIPPED
-
if self._retry_flag and (self._tries <= self._max_retries) and not self._scheduler.terminated:
self.spawn()
return
diff --git a/buildstream/_scheduler/queues/queue.py b/buildstream/_scheduler/queues/queue.py
index 32404f1df..ff38cb512 100644
--- a/buildstream/_scheduler/queues/queue.py
+++ b/buildstream/_scheduler/queues/queue.py
@@ -333,10 +333,8 @@ class Queue():
if success:
self._done_queue.append(job)
- # A Job can be skipped whether or not it has failed,
- # we want to only bookkeep them as processed or failed
- # if they are not skipped.
- if job.skipped:
+ # These lists are for bookkeeping purposes for the UI and logging.
+ if status == JobStatus.SKIPPED:
self.skipped_elements.append(element)
elif status == JobStatus.OK:
self.processed_elements.append(element)