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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user