mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(events): fix session processor event handling
This commit is contained in:
parent
9c45cbe8f7
commit
87f2d04ddd
@ -10,6 +10,7 @@ from invokeai.app.services.events.events_common import (
|
|||||||
FastAPIEvent,
|
FastAPIEvent,
|
||||||
QueueClearedEvent,
|
QueueClearedEvent,
|
||||||
QueueEventBase,
|
QueueEventBase,
|
||||||
|
QueueItemStatusChangedEvent,
|
||||||
SessionCanceledEvent,
|
SessionCanceledEvent,
|
||||||
register_events,
|
register_events,
|
||||||
)
|
)
|
||||||
@ -89,11 +90,7 @@ class DefaultSessionProcessor(SessionProcessorBase):
|
|||||||
self._poll_now()
|
self._poll_now()
|
||||||
elif isinstance(payload, BatchEnqueuedEvent):
|
elif isinstance(payload, BatchEnqueuedEvent):
|
||||||
self._poll_now()
|
self._poll_now()
|
||||||
elif event_name == "queue_item_status_changed" and event[1]["data"]["queue_item"]["status"] in [
|
elif isinstance(payload, QueueItemStatusChangedEvent) and payload.status in ("completed", "failed", "canceled"):
|
||||||
"completed",
|
|
||||||
"failed",
|
|
||||||
"canceled",
|
|
||||||
]:
|
|
||||||
self._poll_now()
|
self._poll_now()
|
||||||
|
|
||||||
def resume(self) -> SessionProcessorStatus:
|
def resume(self) -> SessionProcessorStatus:
|
||||||
|
Loading…
Reference in New Issue
Block a user