forked from retoor/devplacepy
feat: add ISSLOP AI usage analysis CLI commands, game router, and politics topic
- Add `cmd_isslop_prune`, `cmd_isslop_clear`, `cmd_isslop_analyze` CLI commands for AI usage analysis job management - Register `/game` router with `index` and `farm` endpoints for Code Farm idle game - Add `politics` to allowed TOPICS constant replacing `signals` - Introduce `ISSLOP_DIR`, `ISSLOP_WORKSPACES_DIR`, `ISSLOP_RUNS_DIR`, `ISSLOP_MEDIA_DIR` config paths - Add `clear_user_stars` and `clear_user_projects_cache` calls on vote and project create/delete - Update `make prod` to use `nproc` workers via `DEVPLACE_WEB_WORKERS` env var - Convert `database.py` and `utils.py` to packages for modular structure - Add `devplace apikey` and `devplace token` CLI subcommands for API key and access token management
This commit is contained in:
@@ -25,7 +25,7 @@ A logout, ban, role change, or settings save in one worker is therefore honored
|
||||
|
||||
## Rate limiting
|
||||
|
||||
The rate limiter counts per IP in a per-process structure, so N workers would otherwise allow N times the configured limit. Each worker instead enforces `ceil(limit / DEVPLACE_WEB_WORKERS)`, so the aggregate across workers matches the admin-configured value without a database write on every request. `DEVPLACE_WEB_WORKERS` must equal the actual `--workers` count; it is set in `make prod` (2) and the Dockerfile (2), and defaults to 1 for single-worker development.
|
||||
The rate limiter counts per IP in a per-process structure, so N workers would otherwise allow N times the configured limit. Each worker instead enforces `ceil(limit / DEVPLACE_WEB_WORKERS)`, so the aggregate across workers matches the admin-configured value without a database write on every request. `DEVPLACE_WEB_WORKERS` must equal the actual `--workers` count; `make prod` derives both from the box core count (`nproc`, override with `make prod WEB_WORKERS=N`), while the Docker image pins both to 2; it defaults to 1 for single-worker development.
|
||||
|
||||
## First-boot serialization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user