Реализовать lab4 на оценку 4: SeaweedFS, вложения и согласованность БД/S3.

Перенесён стенд lab3 (API, Redis-сессии, идемпотентность, HAProxy, реплики API). Добавлены приватный bucket SeaweedFS с отдельным ключом API, загрузка PNG/JPEG с лимитами и полной проверкой, компенсация и reconciler, плавная остановка API, тесты и evidence.
This commit is contained in:
Mikhail Verkovykh
2026-11-06 19:48:37 +03:00
parent ec540a1a72
commit 728e53cc55
94 changed files with 8821 additions and 43 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

@@ -0,0 +1,17 @@
"""Regenerate synthetic JPEG fixtures (needs Pillow; run once in a throwaway container):
docker run --rm -v "$PWD/student-tests/fixtures:/out" python:3.12.8-slim-bookworm \
sh -c "pip install -q pillow==11.0.0 && python /out/make_jpeg_fixtures.py"
"""
from PIL import Image
im = Image.new("RGB", (320, 200))
px = im.load()
for y in range(200):
for x in range(320):
px[x, y] = (x * 255 // 319, y * 255 // 199, (x + y) % 256)
im.save("/out/sample.jpg", "JPEG", quality=85)
im.save("/out/progressive.jpg", "JPEG", quality=80, progressive=True)
im.convert("L").save("/out/gray.jpg", "JPEG", quality=80)
print("ok")
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB