diff options
-rw-r--r-- | src/buildstream/_frontend/app.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/jobs/cachesizejob.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/jobs/cleanupjob.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/queues/buildqueue.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/queues/fetchqueue.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/queues/pullqueue.py | 4 | ||||
-rw-r--r-- | src/buildstream/_scheduler/queues/queue.py | 4 | ||||
-rw-r--r-- | src/buildstream/_scheduler/queues/trackqueue.py | 2 | ||||
-rw-r--r-- | src/buildstream/_scheduler/scheduler.py | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py index d4ea83871..7aff52af6 100644 --- a/src/buildstream/_frontend/app.py +++ b/src/buildstream/_frontend/app.py @@ -526,7 +526,7 @@ class App(): # Dont attempt to handle a failure if the user has already opted to # terminate - if status == JobStatus.FAIL and not self.stream.terminated: + if status is JobStatus.FAIL and not self.stream.terminated: if isinstance(job, ElementJob): element = job.element diff --git a/src/buildstream/_scheduler/jobs/cachesizejob.py b/src/buildstream/_scheduler/jobs/cachesizejob.py index ed1cc4131..f36c30190 100644 --- a/src/buildstream/_scheduler/jobs/cachesizejob.py +++ b/src/buildstream/_scheduler/jobs/cachesizejob.py @@ -28,7 +28,7 @@ class CacheSizeJob(Job): self._casquota = context.get_casquota() def parent_complete(self, status, result): - if status == JobStatus.OK: + if status is JobStatus.OK: self._casquota.set_cache_size(result) if self._complete_cb: diff --git a/src/buildstream/_scheduler/jobs/cleanupjob.py b/src/buildstream/_scheduler/jobs/cleanupjob.py index 327d687d3..85722c83f 100644 --- a/src/buildstream/_scheduler/jobs/cleanupjob.py +++ b/src/buildstream/_scheduler/jobs/cleanupjob.py @@ -33,7 +33,7 @@ class CleanupJob(Job): self._casquota.set_cache_size(message, write_to_disk=False) def parent_complete(self, status, result): - if status == JobStatus.OK: + if status is JobStatus.OK: self._casquota.set_cache_size(result, write_to_disk=False) if self._complete_cb: diff --git a/src/buildstream/_scheduler/queues/buildqueue.py b/src/buildstream/_scheduler/queues/buildqueue.py index aa489f381..dc82f54ec 100644 --- a/src/buildstream/_scheduler/queues/buildqueue.py +++ b/src/buildstream/_scheduler/queues/buildqueue.py @@ -113,5 +113,5 @@ class BuildQueue(Queue): # artifact cache size for a successful build even though we know a # failed build also grows the artifact cache size. # - if status == JobStatus.OK: + if status is JobStatus.OK: self._check_cache_size(job, element, result) diff --git a/src/buildstream/_scheduler/queues/fetchqueue.py b/src/buildstream/_scheduler/queues/fetchqueue.py index 9edeebb1d..90db77f42 100644 --- a/src/buildstream/_scheduler/queues/fetchqueue.py +++ b/src/buildstream/_scheduler/queues/fetchqueue.py @@ -68,7 +68,7 @@ class FetchQueue(Queue): def done(self, _, element, result, status): - if status == JobStatus.FAIL: + if status is JobStatus.FAIL: return element._fetch_done() diff --git a/src/buildstream/_scheduler/queues/pullqueue.py b/src/buildstream/_scheduler/queues/pullqueue.py index 013ee6489..374181cda 100644 --- a/src/buildstream/_scheduler/queues/pullqueue.py +++ b/src/buildstream/_scheduler/queues/pullqueue.py @@ -54,7 +54,7 @@ class PullQueue(Queue): def done(self, _, element, result, status): - if status == JobStatus.FAIL: + if status is JobStatus.FAIL: return element._pull_done() @@ -62,5 +62,5 @@ class PullQueue(Queue): # Build jobs will check the "approximate" size first. Since we # do not get an artifact size from pull jobs, we have to # actually check the cache size. - if status == JobStatus.OK: + if status is JobStatus.OK: self._scheduler.check_cache_size() diff --git a/src/buildstream/_scheduler/queues/queue.py b/src/buildstream/_scheduler/queues/queue.py index 1efcffc16..7740896b5 100644 --- a/src/buildstream/_scheduler/queues/queue.py +++ b/src/buildstream/_scheduler/queues/queue.py @@ -305,9 +305,9 @@ class Queue(): self._done_queue.append(element) # These lists are for bookkeeping purposes for the UI and logging. - if status == JobStatus.SKIPPED or job.get_terminated(): + if status is JobStatus.SKIPPED or job.get_terminated(): self.skipped_elements.append(element) - elif status == JobStatus.OK: + elif status is JobStatus.OK: self.processed_elements.append(element) else: self.failed_elements.append(element) diff --git a/src/buildstream/_scheduler/queues/trackqueue.py b/src/buildstream/_scheduler/queues/trackqueue.py index 72a79a532..194bb7e1d 100644 --- a/src/buildstream/_scheduler/queues/trackqueue.py +++ b/src/buildstream/_scheduler/queues/trackqueue.py @@ -50,7 +50,7 @@ class TrackQueue(Queue): def done(self, _, element, result, status): - if status == JobStatus.FAIL: + if status is JobStatus.FAIL: return # Set the new refs in the main process one by one as they complete, diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py index 80e14dcd0..da3016b59 100644 --- a/src/buildstream/_scheduler/scheduler.py +++ b/src/buildstream/_scheduler/scheduler.py @@ -329,7 +329,7 @@ class Scheduler(): ) # Schedule a cleanup job if we've hit the threshold - if status != JobStatus.OK: + if status is not JobStatus.OK: return context = self.context |