From f4fdeb12c185b0079b26981dea90ad5d2bf40786 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 2 Oct 2026 11:36:46 +0000 Subject: [PATCH] Remove the non-functional WEB pool size admin control Setting it only rebound main.py's own module-level WEB_POOL_SIZE - runtime.py and maintenance.py each imported their own copy at process start (from config import WEB_POOL_SIZE), so the actual pool-sizing logic in ensure_web_pool()/cleanup_loop never saw the change and kept targeting the .env value. The UI control only ever changed what the admin page displayed back to itself, plus a couple of >0/<=0 branch checks in main.py - never the real pool. Removed the input, button, JS handler and the dead endpoint rather than wiring the three-module sync it would take to make it actually work. Co-Authored-By: Claude Sonnet 5 --- app/main.py | 12 ------------ app/templates/admin.html | 14 -------------- 2 files changed, 26 deletions(-) diff --git a/app/main.py b/app/main.py index 021011e..ab70705 100644 --- a/app/main.py +++ b/app/main.py @@ -1444,8 +1444,6 @@ def admin_page(request: Request, admin: User = Depends(require_admin), db: Sessi "pool_status": pool_status, "service_health": service_health, "web_totals": web_totals, - "web_pool_size": WEB_POOL_SIZE, - "web_pool_buffer": WEB_POOL_BUFFER, "recent_sessions": recent_sessions, "open_stats": open_stats, "online_sessions": online_sessions, @@ -3112,16 +3110,6 @@ def delete_category(category_id: int, request: Request, _: User = Depends(requir return {"ok": True} -@app.put("/api/admin/web-pool-size") -def update_web_pool_size(payload: dict, request: Request, _: User = Depends(require_admin)): - validate_csrf(request) - global WEB_POOL_SIZE - value = max(0, int(payload.get("size", WEB_POOL_SIZE))) - WEB_POOL_SIZE = value - ensure_web_pool() - return {"ok": True, "size": WEB_POOL_SIZE, "pool": get_web_pool_status()} - - @app.post("/api/admin/users") def create_user(payload: dict, request: Request, _: User = Depends(require_admin), db: Session = Depends(get_db)): """The password is never typed by the admin - it's generated here and diff --git a/app/templates/admin.html b/app/templates/admin.html index a3ef448..4924fe7 100644 --- a/app/templates/admin.html +++ b/app/templates/admin.html @@ -287,14 +287,6 @@