fix: restore channels after gateway restart

This commit is contained in:
hectorzhao
2026-08-26 14:04:44 +08:00
parent 8170f727a3
commit b7ae1aa41a
4 changed files with 13 additions and 4 deletions
@@ -58,4 +58,11 @@ if (!workerMain.includes("process.env.API_WORKER_METRICS_HOST?.trim() || '127.0.
throw new Error('send worker metrics must default to loopback');
}
const gatewayRestart = deploy.indexOf('systemctl restart cmpp-gateway');
const apiRestart = deploy.indexOf('systemctl restart cmpp-api');
const workerRestart = deploy.indexOf('systemctl restart cmpp-send-worker');
if (gatewayRestart < 0 || apiRestart < gatewayRestart || workerRestart < apiRestart) {
throw new Error('production deploy must restart Gateway before API and the send worker so API startup restores active channels');
}
console.log('Production deployment verified: Nginx/API guards and the split durable send worker contract are present.');