summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-07 12:55:23 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-07 13:02:00 -0500
commitc2fc2a5ea468c52e02886bac4ba890b4bce8f4b5 (patch)
tree28aa95e4046b0f5d6d61e8a52795c40c6c0dee94
parent16a8816f67cc2d78625c646275aaf337af82129d (diff)
downloadbuildstream-c2fc2a5ea468c52e02886bac4ba890b4bce8f4b5.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 d966a6985..837469a39 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.
@@ -289,18 +288,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 #
#######################################################
@@ -578,9 +565,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 707fcf511..81760ace4 100644
--- a/buildstream/_scheduler/queues/queue.py
+++ b/buildstream/_scheduler/queues/queue.py
@@ -331,10 +331,8 @@ class Queue():
# All jobs get placed on the done queue for later processing.
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)