Refine
This commit is contained in:
2
main.py
2
main.py
@@ -155,7 +155,7 @@ async def fastapi_run_project(network: str) -> str:
|
|||||||
raise HTTPException(status_code=400, detail="is in simulation")
|
raise HTTPException(status_code=400, detail="is in simulation")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
app.state.lock.acquire() # Acquire the lock
|
await app.state.lock.acquire() # Acquire the lock
|
||||||
result = run_project(network)
|
result = run_project(network)
|
||||||
return result
|
return result
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
|
|||||||
Reference in New Issue
Block a user