🐛 fix: balancer remove illogical
This commit is contained in:
parent
0e86c7e4d1
commit
48efdbc7df
@ -68,9 +68,6 @@ func (cc *ChannelsChooser) balancer(channelIds []int) *Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cc *ChannelsChooser) Next(group, modelName string) (*Channel, error) {
|
func (cc *ChannelsChooser) Next(group, modelName string) (*Channel, error) {
|
||||||
if !common.MemoryCacheEnabled {
|
|
||||||
return GetRandomSatisfiedChannel(group, modelName)
|
|
||||||
}
|
|
||||||
cc.RLock()
|
cc.RLock()
|
||||||
defer cc.RUnlock()
|
defer cc.RUnlock()
|
||||||
if _, ok := cc.Rule[group]; !ok {
|
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) {
|
func (cc *ChannelsChooser) GetGroupModels(group string) ([]string, error) {
|
||||||
if !common.MemoryCacheEnabled {
|
|
||||||
return GetGroupModels(group)
|
|
||||||
}
|
|
||||||
|
|
||||||
cc.RLock()
|
cc.RLock()
|
||||||
defer cc.RUnlock()
|
defer cc.RUnlock()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user