Refine
This commit is contained in:
4
main.py
4
main.py
@@ -230,7 +230,9 @@ async def fastapi_run_project_return_dict(network: str) -> dict[str, Any]:
|
|||||||
raise HTTPException(status_code=409, detail="is in simulation")
|
raise HTTPException(status_code=409, detail="is in simulation")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
return run_project_return_dict(network)
|
result = run_project_return_dict(network)
|
||||||
|
logger.info(f"run project result: {result}")
|
||||||
|
return result
|
||||||
finally:
|
finally:
|
||||||
# 手动释放锁(可选,依赖过期时间自动释放更安全)
|
# 手动释放锁(可选,依赖过期时间自动释放更安全)
|
||||||
redis_client.delete(lock_key)
|
redis_client.delete(lock_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user