websockets: Add "update_refreshed" notification
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
5b9f637c2d
commit
0c280122fb
|
@ -186,6 +186,8 @@ class WebsocketManager:
|
||||||
"gpio_power:power_changed", self._handle_power_changed)
|
"gpio_power:power_changed", self._handle_power_changed)
|
||||||
self.server.register_event_handler(
|
self.server.register_event_handler(
|
||||||
"update_manager:update_response", self._handle_update_response)
|
"update_manager:update_response", self._handle_update_response)
|
||||||
|
self.server.register_event_handler(
|
||||||
|
"update_manager:update_refreshed", self._handle_update_refreshed)
|
||||||
|
|
||||||
async def _handle_klippy_ready(self):
|
async def _handle_klippy_ready(self):
|
||||||
await self.notify_websockets("klippy_ready")
|
await self.notify_websockets("klippy_ready")
|
||||||
|
@ -211,6 +213,9 @@ class WebsocketManager:
|
||||||
async def _handle_update_response(self, response):
|
async def _handle_update_response(self, response):
|
||||||
await self.notify_websockets("update_response", response)
|
await self.notify_websockets("update_response", response)
|
||||||
|
|
||||||
|
async def _handle_update_refreshed(self, refresh_info):
|
||||||
|
await self.notify_websockets("update_refreshed", refresh_info)
|
||||||
|
|
||||||
def register_local_handler(self, api_def, callback):
|
def register_local_handler(self, api_def, callback):
|
||||||
for ws_method, req_method in \
|
for ws_method, req_method in \
|
||||||
zip(api_def.ws_methods, api_def.request_methods):
|
zip(api_def.ws_methods, api_def.request_methods):
|
||||||
|
|
Loading…
Reference in New Issue