OPS-05: fix — go.mod auf go 1.25.0 (prometheus/client_golang benoetigt es), sql-typfehler in shouldFire (interval-multiplikation statt string-konkatenation)
This commit is contained in:
@@ -123,7 +123,7 @@ func (d *debounceStore) shouldFire(ctx context.Context, ruleKey string, interval
|
||||
tag, err := d.pool.Exec(ctx, `
|
||||
INSERT INTO alert_debounce_state (rule_key, last_fired_at) VALUES ($1, now())
|
||||
ON CONFLICT (rule_key) DO UPDATE SET last_fired_at = now()
|
||||
WHERE alert_debounce_state.last_fired_at <= now() - ($2 || ' seconds')::interval
|
||||
WHERE alert_debounce_state.last_fired_at <= now() - ($2 * interval '1 second')
|
||||
`, ruleKey, intervalSeconds)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("drosselungszustand pruefen: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user