Compare commits

..

2 Commits

Author SHA1 Message Date
MyronZhang
f51de1ea2e Merge 737534a36b into 8df4a2670b 2025-02-27 09:57:30 +08:00
MyronZhang
737534a36b fix manage channel 2025-02-11 18:44:41 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -251,10 +251,10 @@ func testChannels(ctx context.Context, notify bool, scope string) error {
_ = message.Notify(message.ByAll, fmt.Sprintf("渠道 %s %d测试超时", channel.Name, channel.Id), "", err.Error())
}
}
if isChannelEnabled && monitor.ShouldDisableChannel(openaiErr, -1) {
if isChannelEnabled && (err != nil || monitor.ShouldDisableChannel(openaiErr, -1)) {
monitor.DisableChannel(channel.Id, channel.Name, err.Error())
}
if !isChannelEnabled && monitor.ShouldEnableChannel(err, openaiErr) {
if !isChannelEnabled && (err == nil && monitor.ShouldEnableChannel(err, openaiErr)) {
monitor.EnableChannel(channel.Id, channel.Name)
}
channel.UpdateResponseTime(milliseconds)

View File

@@ -31,7 +31,7 @@
"react-dom": "^18.2.0",
"react-perfect-scrollbar": "^1.5.8",
"react-redux": "^8.0.2",
"react-router": "6.30.2",
"react-router": "6.3.0",
"react-router-dom": "6.3.0",
"react-scripts": "^5.0.1",
"react-turnstile": "^1.1.2",