🐛 fix: balancer remove illogical

This commit is contained in:
Martial BE 2024-03-25 10:54:38 +08:00
parent 0e86c7e4d1
commit 48efdbc7df
No known key found for this signature in database
GPG Key ID: D06C32DF0EDB9084

View File

@ -68,9 +68,6 @@ func (cc *ChannelsChooser) balancer(channelIds []int) *Channel {
}
func (cc *ChannelsChooser) Next(group, modelName string) (*Channel, error) {
if !common.MemoryCacheEnabled {
return GetRandomSatisfiedChannel(group, modelName)
}
cc.RLock()
defer cc.RUnlock()
if _, ok := cc.Rule[group]; !ok {
@ -97,10 +94,6 @@ func (cc *ChannelsChooser) Next(group, modelName string) (*Channel, error) {
}
func (cc *ChannelsChooser) GetGroupModels(group string) ([]string, error) {
if !common.MemoryCacheEnabled {
return GetGroupModels(group)
}
cc.RLock()
defer cc.RUnlock()