websockets: add "klippy_shutdown" notification
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
f753263c60
commit
7d738c7a8b
|
@ -172,6 +172,8 @@ class WebsocketManager:
|
|||
# Register events
|
||||
self.server.register_event_handler(
|
||||
"server:klippy_ready", self._handle_klippy_ready)
|
||||
self.server.register_event_handler(
|
||||
"server:klippy_shutdown", self._handle_klippy_shutdown)
|
||||
self.server.register_event_handler(
|
||||
"server:klippy_disconnect", self._handle_klippy_disconnect)
|
||||
self.server.register_event_handler(
|
||||
|
@ -188,6 +190,9 @@ class WebsocketManager:
|
|||
async def _handle_klippy_ready(self):
|
||||
await self.notify_websockets("klippy_ready")
|
||||
|
||||
async def _handle_klippy_shutdown(self):
|
||||
await self.notify_websockets("klippy_shutdown")
|
||||
|
||||
async def _handle_klippy_disconnect(self):
|
||||
await self.notify_websockets("klippy_disconnected")
|
||||
|
||||
|
|
Loading…
Reference in New Issue