[nodes] Add cancelation to the API

This commit is contained in:
Kyle Schouviller
2023-03-16 20:05:36 -07:00
committed by psychedelicious
parent 076fac07eb
commit bd7e515290
4 changed files with 64 additions and 1 deletions

View File

@ -58,6 +58,12 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
)
)
# Check queue to see if this is canceled, and skip if so
if self.__invoker.services.queue.is_canceled(
graph_execution_state.id
):
continue
# Save outputs and history
graph_execution_state.complete(invocation.id, outputs)
@ -95,6 +101,12 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
)
pass
# Check queue to see if this is canceled, and skip if so
if self.__invoker.services.queue.is_canceled(
graph_execution_state.id
):
continue
# Queue any further commands if invoking all
is_complete = graph_execution_state.is_complete()