fix(channel): improve proxy client compatibility and cache lifecycle (#6157)

* fix(channel): improve proxy client compatibility and cache lifecycle

* test(controller): use non-fatal assertions for channel tests
This commit is contained in:
yyhhyyyyyy
2026-07-20 18:11:22 +08:00
committed by GitHub
parent 08677566f8
commit e13d4033e5
26 changed files with 537 additions and 147 deletions
+1 -2
View File
@@ -99,7 +99,7 @@ func fetchCodexChannelWhamData(
return
}
client, err := service.NewProxyHttpClient(ch.GetSetting().Proxy)
client, err := service.GetHttpClientWithProxy(ch.GetSetting().Proxy)
if err != nil {
common.ApiError(c, err)
return
@@ -133,7 +133,6 @@ func fetchCodexChannelWhamData(
if encErr == nil {
_ = model.DB.Model(&model.Channel{}).Where("id = ?", ch.Id).Update("key", string(encoded)).Error
model.InitChannelCache()
service.ResetProxyClientCache()
}
ctx2, cancel2 := context.WithTimeout(c.Request.Context(), 15*time.Second)