Skip to content

Commit

Permalink
fix: don't schedule attribute changes if rate is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Jul 10, 2024
1 parent 2cc92b8 commit 916d2d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extloadtest/utils.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 Steadybit GmbH

package extloadtest

import (
Expand Down Expand Up @@ -65,7 +68,7 @@ func scheduleContainerTargetChanges(containers *[]discovery_kit_api.Target, back

func scheduleAttributeUpdateIfNecessary[T any](items []T, typeId string, attributeMapAccessor func(item T) map[string][]string) {
spec := config.Config.FindAttributeUpdate(typeId)
if spec == nil {
if spec == nil || spec.Rate <= 0.00000000001 {
return
}
log.Info().
Expand Down

0 comments on commit 916d2d2

Please sign in to comment.