update
This commit is contained in:
7
main.py
7
main.py
@@ -2727,8 +2727,8 @@ def generate_openapi_json():
|
|||||||
# return result
|
# return result
|
||||||
|
|
||||||
# DingZQ, 2025-05-17
|
# DingZQ, 2025-05-17
|
||||||
@app.get("/runsimulationbydate/", response_class = PlainTextResponse)
|
@app.get("/runsimulationbydate/")
|
||||||
async def fastapi_run_project_by_date(network: str, querydate: str) -> bool:
|
async def fastapi_run_project_by_date(network: str, querydate: str):
|
||||||
filename = 'c:/lock.simulation'
|
filename = 'c:/lock.simulation'
|
||||||
filename2 = 'c:/lock.simulation2'
|
filename2 = 'c:/lock.simulation2'
|
||||||
if os.path.exists(filename2):
|
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}")
|
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)
|
simulation.run_simulation(name=network, simulation_type='realtime', modify_pattern_start_time=bg_start_time_str, modify_total_duration=86400)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# real_time api 37.5
|
# real_time api 37.5
|
||||||
# example:
|
# example:
|
||||||
|
|||||||
Reference in New Issue
Block a user