This commit is contained in:
eric
2026-05-19 06:47:07 +00:00
parent e1d7251545
commit 78e1308063
63 changed files with 2527 additions and 186 deletions

View File

@@ -61,6 +61,7 @@ from src.config_governance import (
)
from src.hub_kv_store import get_youtube_pro_channels, set_youtube_pro_channels
from src.hub_routes import YoutubeProChannelsBody, configure_hub, router as hub_router
from src.neko_capacity import ensure_neko_capacity_for_youtube_channels
from src.process_runtime_status import summarize_process_activity, tail_log_text
from src.process_runtime_status import coerce_declared_process_status, process_family
from src.runtime_bootstrap import raise_nofile_limit
@@ -552,7 +553,8 @@ async def alias_youtube_pro_channels_post(body: YoutubeProChannelsBody):
set_youtube_pro_channels(body.channels)
except ValueError as exc:
return JSONResponse({"error": str(exc)}, status_code=400)
return {"message": "ok"}
capacity = await asyncio.to_thread(ensure_neko_capacity_for_youtube_channels, BASE_DIR, body.channels)
return {"message": "ok", "neko": capacity}
app.add_middleware(