minor fix

main
Cizz22 2 months ago
parent ab426bb6e7
commit c2550be789

@ -7,12 +7,18 @@ from temporal.activity import calculate_plant_eaf_activity, execute_simulation_a
@workflow.defn @workflow.defn
class SimulationWorkflow: class SimulationWorkflow:
status = "PENDING" def __init__(self):
self.status = "INITIALIZED"
self.isDone = False
@workflow.query @workflow.query
def get_status(self) -> str: def get_status(self) -> str:
return self.status return self.status
@workflow.query
def is_done(self) -> bool:
return self.isDone
@workflow.run @workflow.run
async def run(self, sim_data: dict) -> str: async def run(self, sim_data: dict) -> str:
self.status = "RUNNING" self.status = "RUNNING"
@ -46,4 +52,5 @@ class SimulationWorkflow:
self.status = "COMPLETED" self.status = "COMPLETED"
# etc… # etc…
self.isDone = True
return sim_data["HubCnnId"] # simulation_id return sim_data["HubCnnId"] # simulation_id

Loading…
Cancel
Save