diff options
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_scheduler/scheduler.py | 2 | ||||
-rw-r--r-- | src/buildstream/_stream.py | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py index 6e7eb4405..41ff1189f 100644 --- a/src/buildstream/_scheduler/scheduler.py +++ b/src/buildstream/_scheduler/scheduler.py @@ -59,7 +59,6 @@ class NotificationType(FastEnum): TERMINATE = "terminate" QUIT = "quit" RUNNING = "running" - TERMINATED = "terminated" SUSPEND = "suspend" UNSUSPEND = "unsuspend" @@ -262,7 +261,6 @@ class Scheduler: # Notify the frontend that we're terminated as it might be # from an interactive prompt callback or SIGTERM - self._notify(Notification(NotificationType.TERMINATED)) self.loop.call_soon(self._terminate_jobs_real) # Block this until we're finished terminating jobs, diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index 707d8c086..9a00ecdc0 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -101,7 +101,7 @@ class Stream: self._interrupt_callback = interrupt_callback self._notifier = self._scheduler._stream_notification_handler # Assign the schedulers notification handler self._scheduler_running = False - self._scheduler_terminated = False + self._terminated = False self._suspended = False # init() @@ -1078,7 +1078,7 @@ class Stream: # @property def terminated(self): - return self._scheduler_terminated + return self._terminated # terminate() # @@ -1087,6 +1087,7 @@ class Stream: def terminate(self): notification = Notification(NotificationType.TERMINATE) self._notify(notification) + self._terminated = True # quit() # @@ -1655,8 +1656,6 @@ class Stream: self._ticker_callback() elif notification.notification_type == NotificationType.RUNNING: self._scheduler_running = not self._scheduler_running - elif notification.notification_type == NotificationType.TERMINATED: - self._scheduler_terminated = True else: raise StreamError("Unrecognised notification type received: {}".format(notification.notification_type)) |