From c2550be789837972089b89a661728ca64dc4b772 Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Thu, 27 Nov 2025 12:39:23 +0700 Subject: [PATCH] minor fix --- temporal/workflow.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/temporal/workflow.py b/temporal/workflow.py index 3ae54d9..60f059b 100644 --- a/temporal/workflow.py +++ b/temporal/workflow.py @@ -7,12 +7,18 @@ from temporal.activity import calculate_plant_eaf_activity, execute_simulation_a @workflow.defn class SimulationWorkflow: - status = "PENDING" + def __init__(self): + self.status = "INITIALIZED" + self.isDone = False @workflow.query def get_status(self) -> str: return self.status + @workflow.query + def is_done(self) -> bool: + return self.isDone + @workflow.run async def run(self, sim_data: dict) -> str: self.status = "RUNNING" @@ -46,4 +52,5 @@ class SimulationWorkflow: self.status = "COMPLETED" # etc… + self.isDone = True return sim_data["HubCnnId"] # simulation_id