InvokeAI/invokeai/app/services/session_queue
psychedelicious 93e4c3dbc2 feat(app): update queue item's session on session completion
The session is never updated in the queue after it is first enqueued. As a result, the queue detail view in the frontend never never updates and the session itself doesn't show outputs, execution graph, etc.

We need a new method on the queue service to update a queue item's session, then call it before updating the queue item's status.

Queue item status may be updated via a session-type event _or_ queue-type event. Adding the updated session to all these events is a hairy - simpler to just update the session before we do anything that could trigger a queue item status change event:
- Before calling `emit_session_complete` in the processor (handles session error, completed and cancel events and the corresponding queue events)
- Before calling `cancel_queue_item` in the processor (handles another way queue items can be canceled, outside the session execution loop)

When serializing the session, both in the new service method and the `get_queue_item` endpoint, we need to use `exclude_none=True` to prevent unexpected validation errors.
2024-05-24 08:59:49 +10:00
..
__init__.py feat: queued generation (#4502) 2023-09-20 15:09:24 +10:00
session_queue_base.py feat(app): update queue item's session on session completion 2024-05-24 08:59:49 +10:00
session_queue_common.py feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00
session_queue_sqlite.py feat(app): update queue item's session on session completion 2024-05-24 08:59:49 +10:00