[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

@ -50,6 +50,10 @@ class Invoker:
new_state = GraphExecutionState(graph=Graph() if graph is None else graph)
self.services.graph_execution_manager.set(new_state)
return new_state
def cancel(self, graph_execution_state_id: str) -> None:
"""Cancels the given execution state"""
self.services.queue.cancel(graph_execution_state_id)
def __start_service(self, service) -> None:
# Call start() method on any services that have it