3a086d9e54
New STALE_DONOR_ALERT_DAYS (.env, global threshold, 0=off) + per-route stale_alert_enabled/stale_alert_ids (routes.json). Checked once per route per cycle against MAX(posted_at) in the DB - self-resetting via a single route_alerts.stale_alert_sent_at timestamp compared against the last post time, so it fires once per quiet spell and re-arms automatically once the donor posts again, no separate ack/clear step needed. If a configured stale_alert_ids recipient can't be reached (never started a chat with the bot), the global TG_ADMIN_IDS get a separate notice about that delivery failure instead of the alert silently vanishing.
28 lines
691 B
JSON
28 lines
691 B
JSON
[
|
|
|
|
// redairsoft_main - с оповещением о простое донора (нужен STALE_DONOR_ALERT_DAYS в .env)
|
|
{
|
|
"id": "redairsoft_main",
|
|
"name": "Red Airsoft (основная группа)",
|
|
"vk_source": "public36860851",
|
|
"tg_chat_id": "-1001303630155",
|
|
"tg_enabled": true,
|
|
"max_chat_id": "123456",
|
|
"max_enabled": true,
|
|
"stale_alert_enabled": true,
|
|
"stale_alert_ids": [123456789]
|
|
},
|
|
|
|
// second_donor - только в TG, MAX выключен
|
|
{
|
|
"id": "second_donor",
|
|
"name": "Вторая донор-группа",
|
|
"vk_source": "someothergroup",
|
|
"tg_chat_id": "-1009999999999",
|
|
"tg_enabled": true,
|
|
"max_chat_id": "",
|
|
"max_enabled": false
|
|
}
|
|
|
|
]
|