Реализовать lab5 на оценку 4: async attachments, outbox, worker и variants.

This commit is contained in:
Mikhail Verkovykh
2026-11-19 20:47:08 +03:00
parent 276dbdad8a
commit 92c67c23c0
86 changed files with 10148 additions and 30 deletions
+16
View File
@@ -0,0 +1,16 @@
-- Lab3: shared idempotency records for POST /messages (across API replicas).
CREATE TABLE IF NOT EXISTS idempotency_records (
user_id UUID NOT NULL,
method TEXT NOT NULL,
path TEXT NOT NULL,
idem_key TEXT NOT NULL,
request_hash TEXT NOT NULL,
response_status INT NOT NULL,
response_body JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
PRIMARY KEY (user_id, method, path, idem_key)
);
CREATE INDEX IF NOT EXISTS idx_idempotency_created
ON idempotency_records (created_at);