Merge pull request #723 from zqq-nuli/fix/oauth-401-temp-unschedulable

fix: OAuth 401 不再永久锁死账号,改用临时不可调度实现自动恢复
This commit is contained in:
Wesley Liddick
2026-03-03 16:33:07 +08:00
committed by GitHub
7 changed files with 175 additions and 49 deletions

View File

@@ -48,8 +48,9 @@ func ProvideTokenRefreshService(
cacheInvalidator TokenCacheInvalidator,
schedulerCache SchedulerCache,
cfg *config.Config,
tempUnschedCache TempUnschedCache,
) *TokenRefreshService {
svc := NewTokenRefreshService(accountRepo, oauthService, openaiOAuthService, geminiOAuthService, antigravityOAuthService, cacheInvalidator, schedulerCache, cfg)
svc := NewTokenRefreshService(accountRepo, oauthService, openaiOAuthService, geminiOAuthService, antigravityOAuthService, cacheInvalidator, schedulerCache, cfg, tempUnschedCache)
// 注入 Sora 账号扩展表仓储,用于 OpenAI Token 刷新时同步 sora_accounts 表
svc.SetSoraAccountRepo(soraAccountRepo)
svc.Start()