mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: 新增 cancelled 状态区分客户端主动断开连接
- 新增 cancelled 请求状态,与系统失败 (failed) 区分 - 客户端主动断开连接 (HTTP 499) 不计入失败率统计 - 前后端同步更新状态枚举、UI 样式和统计逻辑
This commit is contained in:
@@ -337,6 +337,7 @@ class Usage(Base):
|
||||
# streaming: 流式响应进行中
|
||||
# completed: 请求成功完成
|
||||
# failed: 请求失败
|
||||
# cancelled: 客户端主动断开连接
|
||||
status = Column(String(20), default="completed", nullable=False, index=True)
|
||||
|
||||
# 完整请求和响应记录
|
||||
@@ -1567,7 +1568,7 @@ class RequestCandidate(Base):
|
||||
)
|
||||
|
||||
# 状态信息
|
||||
status = Column(String(20), nullable=False) # 'pending', 'success', 'failed', 'skipped'
|
||||
status = Column(String(20), nullable=False) # 'pending', 'streaming', 'success', 'failed', 'cancelled', 'skipped'
|
||||
skip_reason = Column(Text, nullable=True) # 跳过/失败原因
|
||||
is_cached = Column(Boolean, default=False) # 是否为缓存亲和性候选
|
||||
|
||||
|
||||
Reference in New Issue
Block a user