fix: make SimulateEngine.stop() synchronous
The stop() method was async but called from a sync context, causing 'RuntimeError: no running event loop'. Changed to sync since it just sets flags.
This commit is contained in:
@@ -226,7 +226,7 @@ def stop_simulation(
|
||||
|
||||
if run_id in running_simulations:
|
||||
engine = running_simulations[run_id]
|
||||
asyncio.create_task(engine.stop())
|
||||
engine.stop()
|
||||
simulation.status = "stopped"
|
||||
db.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user