Explorar el Código

feat(graph_engine): yield control to other threads before node run. (#17689)

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/1.2.0
-LAN- hace 6 meses
padre
commit
ec29bcf013
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2
    0
      api/core/workflow/graph_engine/graph_engine.py

+ 2
- 0
api/core/workflow/graph_engine/graph_engine.py Ver fichero

try: try:
# run node # run node
retry_start_at = datetime.now(UTC).replace(tzinfo=None) retry_start_at = datetime.now(UTC).replace(tzinfo=None)
# yield control to other threads
time.sleep(0.001)
generator = node_instance.run() generator = node_instance.run()
for item in generator: for item in generator:
if isinstance(item, GraphEngineEvent): if isinstance(item, GraphEngineEvent):

Cargando…
Cancelar
Guardar