Update scheduling algorithm
This commit is contained in:
@@ -335,6 +335,16 @@ def get_settings() -> dict[str, Any]:
|
||||
return db.read_settings(DB_PATH)
|
||||
|
||||
|
||||
@app.post("/api/settings/restart")
|
||||
def restart_and_clear_data() -> dict[str, Any]:
|
||||
deleted_counts = db.reset_all_data(DB_PATH)
|
||||
configure_result_watcher({})
|
||||
return {
|
||||
"status": "cleared",
|
||||
**deleted_counts,
|
||||
}
|
||||
|
||||
|
||||
@app.post("/api/tests/load")
|
||||
def load_tests(request: LoadTestsRequest) -> dict[str, Any]:
|
||||
csv_path = _resolve_requested_csv_path(request.csv_path)
|
||||
@@ -398,6 +408,7 @@ def compile_schedule_endpoint(request: CompileScheduleRequest) -> dict[str, Any]
|
||||
config=t.config,
|
||||
throttled=t.throttled,
|
||||
estimated_minutes=t.estimated_minutes,
|
||||
status=t.status,
|
||||
)
|
||||
for t in stored_tests
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user