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:
sysops
2026-08-29 00:02:11 +02:00
parent 369a40af10
commit 5fcae51aac
4 changed files with 78 additions and 12 deletions
+1 -1
View File
@@ -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)