rename pending tasks api endpoint to be more in line with others

This commit is contained in:
AUTOMATIC1111 2023-12-16 11:04:59 +03:00
parent 5b7d86d42b
commit 86b3aa94e2

View File

@ -74,9 +74,10 @@ class ProgressResponse(BaseModel):
def setup_progress_api(app): def setup_progress_api(app):
app.add_api_route("/internal/pendingTasks", get_pending_tasks, methods=["GET"]) app.add_api_route("/internal/pending-tasks", get_pending_tasks, methods=["GET"])
return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=ProgressResponse) return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=ProgressResponse)
def get_pending_tasks(): def get_pending_tasks():
pending_tasks_ids = list(pending_tasks) pending_tasks_ids = list(pending_tasks)
pending_len = len(pending_tasks_ids) pending_len = len(pending_tasks_ids)