From c2fc2a5ea468c52e02886bac4ba890b4bce8f4b5 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Mon, 7 Jan 2019 12:55:23 -0500 Subject: _scheduler/jobs/job.py: Removed 'skipped' property This is redundant now that we report it through the JobStatus. --- buildstream/_scheduler/jobs/job.py | 16 ---------------- buildstream/_scheduler/queues/queue.py | 6 ++---- 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) -- cgit v1.2.1