docs(agents): 更新 Worker 段落为三个消费者

删除 Popularity worker。worker 进程现在只跑 Social、Like 与 Comment 三个消费者。
补上热度的两句话。计数由业务事务写,热榜是派生滑窗,可用 cmd/reconcile 重建。
验证:文档改动,无命令。
This commit is contained in:
2026-11-01 15:15:40 +08:00
parent 91c13ee022
commit bc1252e66c

View File

@@ -62,7 +62,7 @@ CONFIG_PATH=configs/config.compose-local.yaml go run ./cmd/worker # Worker
### Dual Binary Split ### Dual Binary Split
- `backend/cmd/main.go` — Gin HTTP API server (port 8080, pprof on :6060) - `backend/cmd/main.go` — Gin HTTP API server (port 8080, pprof on :6060)
- `backend/cmd/worker/main.go` — RabbitMQ consumer process (pprof on :6061). Runs the Social, Like, Comment, and Popularity workers in independent goroutines; each gets its own AMQP channel from the shared connection manager and reconnects automatically. (Notification workers, the Outbox poller, and the timeline consumer currently live in the API process — see `router.go`.) - `backend/cmd/worker/main.go` — RabbitMQ consumer process (pprof on :6061). Runs the Social, Like, and Comment workers in independent goroutines; each gets its own AMQP channel from the shared connection manager and reconnects automatically. Interaction counts are written by the business transaction (`ApplyLike`/`ApplyUnlike`/`CreateIdempotentWithPopularity`/`DeleteWithPopularity`); the hot ranking is a derived 60-minute sliding window (`video.ApplyHotDelta`, best-effort after commit, rebuildable with `cmd/reconcile -rebuild-hot`). (Notification workers, the Outbox poller, and the timeline consumer currently live in the API process — see `router.go`.)
### Domain Layer Pattern ### Domain Layer Pattern