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>
9 lines
367 B
SQL
9 lines
367 B
SQL
-- Ported from the SQLite migration of the same number.
|
|
-- 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
|
|
);
|