feat: add job outbox, relay, leases and image variants to the pipeline

Move publishing out of the upload path: a relay process publishes queued
jobs with confirms. Add lease and attempt fencing, backoff with jitter, a
per-job render process with CPU and memory limits, crop and optimized
variants, the failed registry with audited replay, and staging cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 15:36:15 +03:00
co-authored by Claude Opus 5.5
parent 99a222eee2
commit e2a6427c24
102 changed files with 9499 additions and 1916 deletions
+19 -2
View File
@@ -250,12 +250,13 @@ def main() -> int:
project = compose_project()
container = f"{project}-test-api"
worker = f"{project}-test-worker"
containers = (container, worker)
relay = f"{project}-test-relay"
containers = (container, worker, relay)
base_url = f"http://127.0.0.1:{port}"
say(
f"database={test_db} objects={prefix}/ queue={queue} "
f"containers={container} {worker} base_url={base_url}",
f"containers={container} {worker} {relay} base_url={base_url}",
)
for name in containers:
remove_container(name)
@@ -317,6 +318,22 @@ def main() -> int:
"worker",
quiet=True,
)
# без relay задания ждали бы в PostgreSQL: загрузка 202, а ready нет
# (design change pipeline-reliability, решение 13)
say("start relay container")
run(
"docker",
"compose",
"run",
"-d",
"--no-deps",
"--name",
relay,
"-e",
f"DATABASE__NAME={test_db}",
"relay",
quiet=True,
)
say("ready")
for target in ("test", "student_test"):
say(f"make {target}")