feat: only use the top priority when first retry (#1048)
This commit is contained in:
parent
2df877a352
commit
10a926b8f3
@ -62,7 +62,7 @@ func Relay(c *gin.Context) {
|
||||
retryTimes = 0
|
||||
}
|
||||
for i := retryTimes; i > 0; i-- {
|
||||
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel, true)
|
||||
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel, i != retryTimes)
|
||||
if err != nil {
|
||||
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %w", err)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user