This commit is contained in:
DingZQ
2025-05-17 21:35:11 +08:00
parent 851e016ad2
commit 84ba85ac84

View File

@@ -2727,8 +2727,8 @@ def generate_openapi_json():
# return result
# DingZQ, 2025-05-17
@app.get("/runsimulationbydate/", response_class = PlainTextResponse)
async def fastapi_run_project_by_date(network: str, querydate: str) -> bool:
@app.get("/runsimulationbydate/")
async def fastapi_run_project_by_date(network: str, querydate: str):
filename = 'c:/lock.simulation'
filename2 = 'c:/lock.simulation2'
if os.path.exists(filename2):
@@ -2745,10 +2745,9 @@ async def fastapi_run_project_by_date(network: str, querydate: str) -> bool:
print(f"bg_start_time_str: {bg_start_time_str}")
simulation.run_simulation(name=network, simulation_type='realtime', modify_pattern_start_time=bg_start_time_str, modify_total_duration=86400)
return True
############################################################
# real_time api 37.5
# example: