fix: Pipeline 处理添加耗时日志和异常捕获
- message_pipeline.handle_message 添加每步耗时日志(租户解析/会话管理/消息处理) - feishu_longconn_service Pipeline 调用包裹 try/catch,异常时记录完整堆栈 - feishu_bot.py 同样添加 Pipeline 异常捕获 - 防止 Pipeline 内部异常被静默吞掉导致消息无回复
This commit is contained in:
@@ -48,9 +48,6 @@ def start_feishu_longconn_service():
|
||||
try:
|
||||
import logging
|
||||
logger = logging.getLogger("feishu_longconn")
|
||||
logger.info("=" * 80)
|
||||
logger.info("🚀 启动飞书长连接服务(后台线程)")
|
||||
logger.info("=" * 80)
|
||||
|
||||
from src.integrations.feishu_longconn_service import get_feishu_longconn_service
|
||||
service = get_feishu_longconn_service()
|
||||
@@ -76,9 +73,6 @@ def check_database_connection():
|
||||
|
||||
def main():
|
||||
"""主函数"""
|
||||
print("=" * 60)
|
||||
print("TSP智能助手 - 综合管理平台")
|
||||
print("=" * 60)
|
||||
start_time = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
||||
print(f"启动时间: {start_time}")
|
||||
print()
|
||||
@@ -91,9 +85,6 @@ def main():
|
||||
# 检查必要目录
|
||||
os.makedirs("logs", exist_ok=True)
|
||||
os.makedirs("data", exist_ok=True)
|
||||
|
||||
logger.info("正在启动TSP智能助手综合管理平台...")
|
||||
|
||||
# 检查数据库连接
|
||||
if not check_database_connection():
|
||||
logger.error("数据库连接失败,退出启动")
|
||||
|
||||
Reference in New Issue
Block a user