diff options
author | Benjamin Schubert <contact@benschubert.me> | 2020-07-04 17:45:36 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-07-06 18:07:53 +0000 |
commit | 598345c76510bc703e3f488a5fd8c0b1170509e3 (patch) | |
tree | ba478aed13a72cdcdf45e1b20d4be17e8aede05c /src/buildstream/_scheduler | |
parent | 7dd880048ce6eaf8fe6d49b8dfa84bfd5629bc12 (diff) | |
download | buildstream-598345c76510bc703e3f488a5fd8c0b1170509e3.tar.gz |
_stream.py: Stop using a 'RUNNING' event to know the state of the scheduler
The stream is itself calling the `run` method on the scheduler, we don't
need another indirection
Diffstat (limited to 'src/buildstream/_scheduler')
-rw-r--r-- | src/buildstream/_scheduler/scheduler.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py index 41ff1189f..0c94fd376 100644 --- a/src/buildstream/_scheduler/scheduler.py +++ b/src/buildstream/_scheduler/scheduler.py @@ -58,7 +58,6 @@ class NotificationType(FastEnum): TICK = "tick" TERMINATE = "terminate" QUIT = "quit" - RUNNING = "running" SUSPEND = "suspend" UNSUSPEND = "unsuspend" @@ -176,9 +175,6 @@ class Scheduler: self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop) - # Notify that the loop has been created - self._notify(Notification(NotificationType.RUNNING)) - # Add timeouts self.loop.call_later(1, self._tick) @@ -214,9 +210,6 @@ class Scheduler: failed = any(queue.any_failed_elements() for queue in self.queues) self.loop = None - # Notify that the loop has been reset - self._notify(Notification(NotificationType.RUNNING)) - if failed: status = SchedStatus.ERROR elif self.terminated: |