mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
perf(usage): user-me usage 查询避免全量加载,默认限制 7 天范围
- UsageAuditListQuery 新增 limit 字段,支持在 SQL 层 LIMIT - user-me usage 端点无时间范围时默认查最近 7 天 - active usage 端点无 ids 过滤时限制查最近 1 小时 - InMemory 实现同步支持 limit truncate
This commit is contained in:
@@ -481,6 +481,7 @@ pub struct UsageAuditListQuery {
|
||||
pub provider_name: Option<String>,
|
||||
pub model: Option<String>,
|
||||
pub statuses: Option<Vec<String>>,
|
||||
pub limit: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default, serde::Serialize, serde::Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user