From 51e4d2fc85c6cfdf9ce89807f31caa4b99266c66 Mon Sep 17 00:00:00 2001 From: yatmanov Date: Tue, 20 Feb 2024 17:59:33 +0300 Subject: [PATCH] Fix deadlock in example script when run inside PA --- examples/execute_and_save_project.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/execute_and_save_project.py b/examples/execute_and_save_project.py index e5be3a0..569a78e 100644 --- a/examples/execute_and_save_project.py +++ b/examples/execute_and_save_project.py @@ -1,4 +1,3 @@ -import time import polyanalyst6api server_url = '' # protocol, domain, port : https://www.example.com/ or https://localhost:5043/ @@ -11,9 +10,5 @@ with polyanalyst6api.API(server_url, username, password) as api: prj = api.project(project_id) - prj.execute(node_name) + prj.execute(node_name, wait=True) prj.save() - - # wait until node is executed and project is saved - while prj.is_running(wave_id=-1): - time.sleep(1)