Setup: skip unreferenced chargers (#26870)
This commit is contained in:
parent
6fa6b91763
commit
1d8c8ba79c
1 changed files with 6 additions and 2 deletions
|
|
@ -238,6 +238,7 @@ func configureMeters(static []config.Named, names ...string) error {
|
|||
return fmt.Errorf("cannot create meter %d: missing name", i+1)
|
||||
}
|
||||
|
||||
// configure all, if no name refs are given
|
||||
if len(names) > 0 && !slices.Contains(names, cc.Name) {
|
||||
continue
|
||||
}
|
||||
|
|
@ -272,7 +273,8 @@ func configureMeters(static []config.Named, names ...string) error {
|
|||
eg.Go(func() error {
|
||||
cc := conf.Named()
|
||||
|
||||
if len(names) > 0 && !slices.Contains(names, cc.Name) {
|
||||
// always skip unreferenced db devices
|
||||
if !slices.Contains(names, cc.Name) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -310,6 +312,7 @@ func configureChargers(static []config.Named, names ...string) error {
|
|||
return fmt.Errorf("cannot create charger %d: missing name", i+1)
|
||||
}
|
||||
|
||||
// configure all, if no name refs are given
|
||||
if len(names) > 0 && !slices.Contains(names, cc.Name) {
|
||||
continue
|
||||
}
|
||||
|
|
@ -344,7 +347,8 @@ func configureChargers(static []config.Named, names ...string) error {
|
|||
eg.Go(func() error {
|
||||
cc := conf.Named()
|
||||
|
||||
if len(names) > 0 && !slices.Contains(names, cc.Name) {
|
||||
// always skip unreferenced db devices
|
||||
if !slices.Contains(names, cc.Name) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue