Files
llmgw/internal/store/migrations/sqlite/0043_notify_sent.sql
Ilker ManapandClaude Opus 5.5 39bb8ee557 Two control planes send a notification once
Each kept its own hour of quiet per event, so a budget spent on a team
both control planes served was announced by each. An event is now claimed
in the store before it is sent (notify_sent, migration 0043; one statement,
so two asking at once cannot both win), and only the claimer sends it. A
store that cannot be asked sends it anyway.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 13:36:08 +02:00

8 lines
311 B
SQL

-- When each notification was last sent, by its kind and subject: every
-- control plane raises the same events — a budget spent is seen by each one
-- serving its requests — and the one that claims an event here sends it.
CREATE TABLE notify_sent (
key TEXT PRIMARY KEY,
sent_at BIGINT NOT NULL
);