[AI] docs: dramacmt 补上部署与 run_cmt.sh 的用法
其余四站的连接串只在同步服务器上,照 contentsync 的办法交叉编译 scp 过去, 用服务器自己的 env.sh,凭据不出那台机器。每次 contentsync 带进新短剧之后 要跑一遍 run_cmt.sh。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -141,6 +141,34 @@ go build -o /tmp/dramacmt ./scripts/dramacmt/
|
||||
「N 条评论」但列表是空的。2026-11-03 实测:一次增量同步带进 16 部新短剧,
|
||||
全都带着源站的 `countComment`。
|
||||
|
||||
## 部署
|
||||
|
||||
tangguo 的连接串在本仓库 `app/config/app.json` 的 `mongo.videoDbUrl`,本地直接跑。
|
||||
**其余四站的连接串只在同步服务器上**(`/server/sync/env.sh`、`hgmj_env.sh`,权限 600),
|
||||
所以照 `scripts/contentsync` 的办法交叉编译静态二进制 scp 过去,让它用服务器自己的
|
||||
连接串,凭据不出那台机器:
|
||||
|
||||
```bash
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dramacmt ./scripts/dramacmt/
|
||||
scp dramacmt root@172.104.39.32:/server/sync/
|
||||
```
|
||||
|
||||
服务器上的 `/server/sync/run_cmt.sh` 负责 source 连接串并按站点循环,日志
|
||||
`/var/log/dramacmt.log`。**不进 cron**,手动跑:
|
||||
|
||||
```bash
|
||||
/server/sync/run_cmt.sh # 默认 huangguo 91fans hgmj 51dj
|
||||
SITES="hgmj 51dj" /server/sync/run_cmt.sh # 指定站点
|
||||
DRY=--dry-run /server/sync/run_cmt.sh # 干跑
|
||||
```
|
||||
|
||||
`--top-up` 把 50~200 当成目标总量、已达标的不动,所以可以反复跑。**每次
|
||||
contentsync 带进新短剧之后跑一遍**:新剧既没有评论,又带着源站的 `countComment`,
|
||||
不补的话在 App 里显示「有 N 条评论但列表是空的」。
|
||||
|
||||
2026-11-03 实测一次增量同步之后:四站各有 43 / 43 / 39 / 39 部新剧待补,
|
||||
共写入 19,300 条,重算修正 229 部,耗时 9 秒。
|
||||
|
||||
## 撤回
|
||||
|
||||
机器人用户和评论都带标记,撤回是两条命令:
|
||||
|
||||
Reference in New Issue
Block a user