mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-12 15:21:09 +00:00
feat: support ClickHouse log database (#5663)
* feat: support ClickHouse log database * feat(log): optimize log deletion process for ClickHouse
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ func UserCheckin(userId int) (*Checkin, error) {
|
||||
}
|
||||
|
||||
// 根据数据库类型选择不同的策略
|
||||
if common.UsingSQLite {
|
||||
if common.UsingMainDatabase(common.DatabaseTypeSQLite) {
|
||||
// SQLite 不支持嵌套事务,使用顺序操作 + 手动回滚
|
||||
return userCheckinWithoutTransaction(checkin, userId, quotaAwarded)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user