From de2156a92d275287cc14c1dec5940096e7ceb846 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Fri, 21 Jul 2023 11:47:00 -0400 Subject: [PATCH] Keep workflow progress consistent with time --- app/config.py | 2 +- app/controllers/subprocesses/status.py | 4 +++- app/controllers/subprocesses/wf_manager.py | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/config.py b/app/config.py index 2168164..8e394bf 100644 --- a/app/config.py +++ b/app/config.py @@ -3,7 +3,7 @@ class Settings(BaseSettings): pflink_mongodb: MongoDsn = 'mongodb://localhost:27017' - version: str = "3.5.3" + version: str = "3.5.4" class Auth(BaseSettings): diff --git a/app/controllers/subprocesses/status.py b/app/controllers/subprocesses/status.py index 15c4596..16a29e4 100644 --- a/app/controllers/subprocesses/status.py +++ b/app/controllers/subprocesses/status.py @@ -73,7 +73,9 @@ def update_workflow_progress(response: WorkflowStatusResponseSchema): for elem in State: if response.workflow_state == elem: state_progress = int(response.state_progress.replace('%','')) - response.workflow_progress_perc = __progress_percent(index,MAX_STATE,state_progress) + + response.workflow_progress_perc = max(response.workflow_progress_perc, + __progress_percent(index,MAX_STATE,state_progress)) index += 1 return response diff --git a/app/controllers/subprocesses/wf_manager.py b/app/controllers/subprocesses/wf_manager.py index 8829216..61e9096 100644 --- a/app/controllers/subprocesses/wf_manager.py +++ b/app/controllers/subprocesses/wf_manager.py @@ -247,7 +247,6 @@ def __run_pipeline_instance(previous_id: str, request: WorkflowRequestSchema, cl """ Run a workflow instance on an existing (previous) plugin instance ID in CUBE """ - print(previous_id) # search for pipeline pipeline_search_params = {"name": request.workflow_info.pipeline_name} pipeline_id = client.getPipelineId(pipeline_search_params)