lab5: async attachment pipeline (RabbitMQ + worker), thumbnail/crop/optimized, outbox relay, lease, idempotent replay (grade 4)

This commit is contained in:
2026-11-03 20:50:30 +03:00
parent 276dbdad8a
commit 15c3697bdc
45 changed files with 4964 additions and 19 deletions
@@ -0,0 +1,25 @@
"""add variants column to attachments
Revision ID: <hash>
Revises: 25c48b226c14
Create Date: <date>
"""
from __future__ import annotations
from alembic import op
revision = "d60dfc3e075a"
down_revision = "25c48b226c14"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.execute("""
ALTER TABLE attachments
ADD COLUMN IF NOT EXISTS variants JSONB NOT NULL DEFAULT '[]'::jsonb
""")
def downgrade() -> None:
op.execute("ALTER TABLE attachments DROP COLUMN IF EXISTS variants")