fix(drift_narrator): send_text → send_notification + DriftLevel case fix
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 14m43s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 14m43s
This commit is contained in:
@@ -130,8 +130,8 @@ class DriftNarratorService:
|
||||
if item.field_path not in _HPA_ALLOWLIST_PATHS
|
||||
and not item.is_allowlisted
|
||||
]
|
||||
high = sum(1 for i in non_hpa_items if i.drift_level.value == "HIGH")
|
||||
medium = sum(1 for i in non_hpa_items if i.drift_level.value == "MEDIUM")
|
||||
high = sum(1 for i in non_hpa_items if i.drift_level.value == "high")
|
||||
medium = sum(1 for i in non_hpa_items if i.drift_level.value == "medium")
|
||||
return high >= TRIGGER_HIGH_MIN or medium >= TRIGGER_MEDIUM_MIN
|
||||
|
||||
async def _generate_narrative(
|
||||
@@ -233,7 +233,7 @@ class DriftNarratorService:
|
||||
|
||||
try:
|
||||
tg = get_telegram_gateway()
|
||||
await tg.send_text(msg[:4096])
|
||||
await tg.send_notification(msg[:4096])
|
||||
except Exception as e:
|
||||
logger.warning("drift_narrator_telegram_error", error=str(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user