Backup automatico script del 2026-07-19 07:00
This commit is contained in:
@@ -128,6 +128,17 @@ def telegram_send_markdown(message: str, chat_ids: Optional[List[str]] = None) -
|
||||
if not message:
|
||||
return False
|
||||
|
||||
try:
|
||||
from telegram_gate import mirror_alert_to_web, telegram_alerts_enabled
|
||||
except ImportError:
|
||||
telegram_alerts_enabled = lambda: True # type: ignore
|
||||
mirror_alert_to_web = lambda *a, **k: False # type: ignore
|
||||
|
||||
if not telegram_alerts_enabled():
|
||||
LOGGER.info("Telegram sospeso: skip nowcast_120m")
|
||||
mirror_alert_to_web(message, "nowcast_120m", "warning", is_html=False)
|
||||
return False
|
||||
|
||||
token = load_bot_token()
|
||||
if not token:
|
||||
LOGGER.error("Token Telegram mancante. Messaggio NON inviato.")
|
||||
|
||||
Reference in New Issue
Block a user