Skip to content

Commit

Permalink
Fix bug: Cooldown interval config used instead of report interval (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBollag authored Nov 22, 2023
1 parent ffe2aa9 commit cdd37bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kafka-watcher/pkg/logwatcher/filewatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (w *LogFileWatcher) RunForever(ctx context.Context) error {
go w.watchForever(ctx)

for {
time.Sleep(viper.GetDuration(config.KafkaCooldownIntervalKey))
time.Sleep(viper.GetDuration(config.KafkaReportIntervalKey))

if err := w.reportResults(ctx); err != nil {
logrus.WithError(err).Errorf("Failed reporting watcher results to mapper")
Expand Down
2 changes: 1 addition & 1 deletion src/kafka-watcher/pkg/logwatcher/kubeneteslogwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (w *KubernetesLogWatcher) RunForever(ctx context.Context) error {
}

for {
time.Sleep(viper.GetDuration(config.KafkaCooldownIntervalKey))
time.Sleep(viper.GetDuration(config.KafkaReportIntervalKey))
if err := w.reportResults(ctx); err != nil {
logrus.WithError(err).Errorf("Failed reporting watcher results to mapper")
}
Expand Down

0 comments on commit cdd37bb

Please sign in to comment.