fix: 修复通知日志不可见问题
- notify_dispatch/agent_dispatcher 改用主logger(alert_platform) - edge_compat 异常不再静默吞掉,输出错误日志 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,8 +56,8 @@ async def edge_alarm_report(
|
||||
"snapshot_url": alarm.snapshot_url,
|
||||
}
|
||||
asyncio.create_task(process_alarm_notification(notify_data))
|
||||
except Exception:
|
||||
pass # 通知失败不影响主流程
|
||||
except Exception as e:
|
||||
logger.error(f"触发告警通知失败: {e}", exc_info=True)
|
||||
|
||||
return YudaoResponse.success({
|
||||
"alarmId": alarm.alarm_id,
|
||||
|
||||
@@ -11,15 +11,13 @@
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Dict, Optional
|
||||
|
||||
from openai import AsyncOpenAI
|
||||
|
||||
from app.config import settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from app.utils.logger import logger
|
||||
|
||||
INTENT_SYSTEM_PROMPT = """你是物业安防AI助手。根据用户消息识别意图,仅输出JSON。
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
VLM 或企微不可用时自动降级,不影响系统运行。
|
||||
"""
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from typing import Dict, List
|
||||
|
||||
@@ -22,8 +21,7 @@ from app.models import (
|
||||
from app.config import settings
|
||||
from app.services.vlm_service import get_vlm_service
|
||||
from app.services.wechat_service import get_wechat_service
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from app.utils.logger import logger
|
||||
|
||||
|
||||
async def process_alarm_notification(alarm_data: Dict):
|
||||
|
||||
Reference in New Issue
Block a user