lib/streamaggr: allow one second aggregation interval

This commit is contained in:
Aliaksandr Valialkin 2024-03-01 21:33:05 +02:00
parent 18db573b10
commit eb8e95516f
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -272,8 +272,8 @@ func newAggregator(cfg *Config, pushFunc PushFunc, dedupInterval time.Duration)
if err != nil { if err != nil {
return nil, fmt.Errorf("cannot parse `interval: %q`: %w", cfg.Interval, err) return nil, fmt.Errorf("cannot parse `interval: %q`: %w", cfg.Interval, err)
} }
if interval <= time.Second { if interval < time.Second {
return nil, fmt.Errorf("aggregation interval should be higher than 1s; got %s", interval) return nil, fmt.Errorf("aggregation interval cannot be smaller than 1s; got %s", interval)
} }
// check cfg.StalenessInterval // check cfg.StalenessInterval