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