docs: update cron-drain example to use MW_APP_DOMAIN parameter (auto-prepend https://)

This commit is contained in:
anonsaber 2026-10-10 19:27:20 +08:00
parent 77bb253cc0
commit b7e02dd9c8
2 changed files with 4 additions and 4 deletions

View File

@ -256,10 +256,10 @@ Push delivery can be delayed or missed; an external scheduler is the safety net.
that can reach your origin, every 5–10 minutes: that can reach your origin, every 5–10 minutes:
```sh ```sh
MW_APP_URL=https://mw.example.com \ MW_APP_DOMAIN=mw.example.com \
MW_WORKER_TOKEN=<worker token> \ MW_WORKER_TOKEN=<worker token> \
MW_RECONCILE_TOKEN=<reconcile token> \ MW_RECONCILE_TOKEN=<reconcile token> \
scripts/cron-drain.sh scripts/cron-drain.sh --once
``` ```
The script drains the queue (`/worker`) and rescans for missed pushes (`/reconcile`); both return The script drains the queue (`/worker`) and rescans for missed pushes (`/reconcile`); both return

View File

@ -175,10 +175,10 @@ curl -s "https://api.telegram.org/bot<TOKEN>/getWebhookInfo"
Push 投递可能延迟或丢失;外部调度器是兜底。在任意一台能访问你源站的机器上,每 5–10 分钟跑一次: Push 投递可能延迟或丢失;外部调度器是兜底。在任意一台能访问你源站的机器上,每 5–10 分钟跑一次:
```sh ```sh
MW_APP_URL=https://mw.example.com \ MW_APP_DOMAIN=mw.example.com \
MW_WORKER_TOKEN=<worker token> \ MW_WORKER_TOKEN=<worker token> \
MW_RECONCILE_TOKEN=<reconcile token> \ MW_RECONCILE_TOKEN=<reconcile token> \
scripts/cron-drain.sh scripts/cron-drain.sh --once
``` ```
脚本会排空队列(`/worker`)并重扫漏掉的 push(`/reconcile`);两者成功都回答 204 空 body。`MW_RECONCILE_TOKEN` 是可选的——省略时跳过 reconcile 步骤,只排空队列。如果你把负载均衡器放在前面,`/worker` 必须直达后端源站——原因见 §6.3。 脚本会排空队列(`/worker`)并重扫漏掉的 push(`/reconcile`);两者成功都回答 204 空 body。`MW_RECONCILE_TOKEN` 是可选的——省略时跳过 reconcile 步骤,只排空队列。如果你把负载均衡器放在前面,`/worker` 必须直达后端源站——原因见 §6.3。