fix: follow live request results and prioritize usable groups

This commit is contained in:
cneicy committed 2026-09-26 14:49:12 +08:00
1 parent 5152a4080e
commit d09216bbde
12 files changed
+257 -86

No files matched your search

+2 -2
View File
@@ -38,8 +38,8 @@ func RecordRelayResult(ctx context.Context, info *relaycommon.RelayInfo, apiErr
return
}
now := time.Now()
if outcome == OutcomeSuccess && !info.IsChannelTest && info.TokenId > 0 {
recordUserSuccess(info.UsingGroup, now.Unix())
if !info.IsChannelTest && info.TokenId > 0 {
recordUserResult(info.UsingGroup, UserRequestResult{At: now.UnixMilli(), Success: outcome == OutcomeSuccess})
}
hasTtft := info.IsStream && info.HasSendResponse()
ttftMs := int64(0)