mirror of
https://github.com/songquanpeng/one-api.git
synced 2026-02-06 06:04:24 +08:00
feat: 引入到期时间概念,当非default的分组时将有到期时间概念
fix: 修复旧用户的vip被降级,尽量不对原先用户做变动
This commit is contained in:
@@ -95,6 +95,9 @@ func SyncOptions(frequency int) {
|
||||
for {
|
||||
time.Sleep(time.Duration(frequency) * time.Second)
|
||||
logger.SysLog("syncing options from database")
|
||||
if config.IsMasterNode {
|
||||
checkAndDowngradeUsers()
|
||||
}
|
||||
loadOptionsFromDatabase()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user