mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(events): typing for download event handler
This commit is contained in:
parent
b50133d5e1
commit
ddff9b4584
@ -15,6 +15,7 @@ from invokeai.app.services.events.events_common import (
|
|||||||
DownloadCancelledEvent,
|
DownloadCancelledEvent,
|
||||||
DownloadCompleteEvent,
|
DownloadCompleteEvent,
|
||||||
DownloadErrorEvent,
|
DownloadErrorEvent,
|
||||||
|
DownloadEventBase,
|
||||||
DownloadProgressEvent,
|
DownloadProgressEvent,
|
||||||
DownloadStartedEvent,
|
DownloadStartedEvent,
|
||||||
FastAPIEvent,
|
FastAPIEvent,
|
||||||
@ -117,7 +118,7 @@ class SocketIO:
|
|||||||
async def _handle_queue_event(self, event: FastAPIEvent[QueueEventBase]):
|
async def _handle_queue_event(self, event: FastAPIEvent[QueueEventBase]):
|
||||||
await self._sio.emit(event=event[0], data=event[1].model_dump(mode="json"), room=event[1].queue_id)
|
await self._sio.emit(event=event[0], data=event[1].model_dump(mode="json"), room=event[1].queue_id)
|
||||||
|
|
||||||
async def _handle_model_event(self, event: FastAPIEvent[ModelEventBase]) -> None:
|
async def _handle_model_event(self, event: FastAPIEvent[ModelEventBase | DownloadEventBase]) -> None:
|
||||||
await self._sio.emit(event=event[0], data=event[1].model_dump(mode="json"))
|
await self._sio.emit(event=event[0], data=event[1].model_dump(mode="json"))
|
||||||
|
|
||||||
async def _handle_bulk_image_download_event(self, event: FastAPIEvent[BulkDownloadEventBase]) -> None:
|
async def _handle_bulk_image_download_event(self, event: FastAPIEvent[BulkDownloadEventBase]) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user