multiplexer: STANDBY-modus (webhooks ACKen maar niet doorsturen) voor warme failover-replica
This commit is contained in:
parent
9aea446bec
commit
79e86ec04e
1 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ const server = http.createServer((req, res) => {
|
|||
}
|
||||
if (payload.type !== 'Message') return
|
||||
const chat = chatJID(payload)
|
||||
// Standby: warm-deployed failover-replica. Ontvangt wuzapi-webhook en bevestigt
|
||||
// (200) maar routeert NIET door — de bots antwoorden niet. Uitzetten (STANDBY leeg)
|
||||
// + herstart = cutover-overstap.
|
||||
if (process.env.STANDBY === '1' || process.env.STANDBY === 'true') {
|
||||
console.log(`[multiplexer] STANDBY — webhook genegeerd (chat ${chat})`)
|
||||
return
|
||||
}
|
||||
let target
|
||||
if (chat === DIENST_GROUP) target = DIENST_WEBHOOK
|
||||
else if (chat === MERPLUS_GROUP) target = MERPLUS_WEBHOOK
|
||||
|
|
|
|||
Loading…
Reference in a new issue