mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(backend): handle BatchSessionNotFoundException
in BatchManager._process()
The internal `BatchProcessStorage.get_session()` method throws when it finds nothing, but we were not catching any exceptions. This caused a exception when the batch manager handles a `graph_execution_state_complete` event that did not originate from a batch. Fixed by handling the exception.
This commit is contained in:
parent
e62d5478fd
commit
59bc9ed399
@ -71,8 +71,9 @@ class BatchManager(BatchManagerBase):
|
||||
|
||||
async def _process(self, event: Event, err: bool) -> None:
|
||||
data = event[1]["data"]
|
||||
try:
|
||||
batch_session = self.__batch_process_storage.get_session(data["graph_execution_state_id"])
|
||||
if not batch_session:
|
||||
except BatchSessionNotFoundException:
|
||||
return None
|
||||
changes = BatchSessionChanges(state="error" if err else "completed")
|
||||
batch_session = self.__batch_process_storage.update_session_state(
|
||||
|
Loading…
Reference in New Issue
Block a user