Run unmodified graph if no batch data is provided

This commit is contained in:
Brandon Rising 2023-08-18 13:33:09 -04:00
parent cb65526880
commit 99e03fe92e

View File

@ -137,6 +137,11 @@ class BatchManager(BatchManagerBase):
self.__invoker.services.graph_execution_manager.set(ges) self.__invoker.services.graph_execution_manager.set(ges)
batch_session = BatchSession(batch_id=batch_process.batch_id, session_id=ges.id, state="created") batch_session = BatchSession(batch_id=batch_process.batch_id, session_id=ges.id, state="created")
sessions.append(self.__batch_process_storage.create_session(batch_session)) sessions.append(self.__batch_process_storage.create_session(batch_session))
if not sessions:
ges = GraphExecutionState(graph=batch_process.graph)
self.__invoker.services.graph_execution_manager.set(ges)
batch_session = BatchSession(batch_id=batch_process.batch_id, session_id=ges.id, state="created")
sessions.append(self.__batch_process_storage.create_session(batch_session))
return sessions return sessions
def cancel_batch_process(self, batch_process_id: str) -> None: def cancel_batch_process(self, batch_process_id: str) -> None: