Updated *load dispatcher strategy

This commit is contained in:
Trial97
2019-08-09 17:31:27 +03:00
committed by Dan Christian Bogos
parent 114380bb6a
commit 866caaf1c8

View File

@@ -84,15 +84,15 @@ func newDispatcher(dm *engine.DataManager, pfl *engine.DispatcherProfile) (d Dis
}
case utils.MetaLoad:
hosts := pfl.Hosts.Clone()
if ls, err := newLoadStrattegyDispatcher(hosts); err != nil {
ls, err := newLoadStrattegyDispatcher(hosts)
if err != nil {
return nil, err
} else {
d = &WeightDispatcher{
dm: dm,
tnt: pfl.Tenant,
hosts: hosts,
strategy: ls,
}
}
d = &WeightDispatcher{
dm: dm,
tnt: pfl.Tenant,
hosts: hosts,
strategy: ls,
}
default:
err = fmt.Errorf("unsupported dispatch strategy: <%s>", pfl.Strategy)