fix: auto-fix code issues (cron)
- 修复重复导入/字段 (llm_client.py 中的重复注释) - 修复PEP8格式问题 (E501行长度超过100字符) - 修复多行SQL语句和字符串格式化 - 修复f-string过长问题 涉及文件: - backend/developer_ecosystem_manager.py - backend/document_processor.py - backend/enterprise_manager.py - backend/export_manager.py - backend/growth_manager.py - backend/llm_client.py - backend/localization_manager.py - backend/main.py - backend/neo4j_manager.py - backend/ops_manager.py - backend/performance_manager.py - backend/plugin_manager.py - backend/search_manager.py - backend/security_manager.py - backend/subscription_manager.py - backend/tenant_manager.py - backend/test_phase8_task6.py - backend/test_phase8_task8.py - backend/tingwu_client.py - backend/workflow_manager.py
This commit is contained in:
@@ -496,7 +496,8 @@ class CacheManager:
|
||||
# 预热实体数据
|
||||
entities = conn.execute(
|
||||
"""SELECT e.*,
|
||||
(SELECT COUNT(*) FROM entity_mentions m WHERE m.entity_id = e.id) as mention_count
|
||||
(SELECT COUNT(*) FROM entity_mentions m WHERE m.entity_id = e.id)
|
||||
as mention_count
|
||||
FROM entities e
|
||||
WHERE e.project_id = ?
|
||||
ORDER BY mention_count DESC
|
||||
@@ -788,7 +789,8 @@ class DatabaseSharding:
|
||||
target_conn.execute(
|
||||
"""
|
||||
INSERT OR REPLACE INTO entity_relations
|
||||
(id, project_id, source_entity_id, target_entity_id, relation_type, evidence, created_at)
|
||||
(id, project_id, source_entity_id, target_entity_id, relation_type,
|
||||
evidence, created_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
""",
|
||||
tuple(relation),
|
||||
@@ -1409,7 +1411,10 @@ class PerformanceMonitor:
|
||||
"type": "performance_alert",
|
||||
"metric": metric.to_dict(),
|
||||
"threshold": self.alert_threshold,
|
||||
"message": f"{metric.metric_type} exceeded threshold: {metric.duration_ms}ms > {self.alert_threshold}ms",
|
||||
"message": (
|
||||
f"{metric.metric_type} exceeded threshold: "
|
||||
f"{metric.duration_ms}ms > {self.alert_threshold}ms"
|
||||
),
|
||||
}
|
||||
|
||||
for handler in self.alert_handlers:
|
||||
|
||||
Reference in New Issue
Block a user