InvokeAI/invokeai/app/api
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
..
routers feat(app): update queue item's session on session completion 2024-05-24 08:59:49 +10:00
dependencies.py tidy(api): reverted unnecessary changes in dependencies.py 2024-04-23 17:12:14 +10:00
events.py chore: ruff check - fix flake8-comprensions 2023-11-11 10:55:23 +11:00
no_cache_staticfiles.py fix(api): typo in no_cache_staticfiles.py 2024-01-22 16:10:25 +11:00
sockets.py linted and styling 2024-03-01 10:42:33 +11:00