Отделить обработку вложений от приёма файла.

Upload отвечает 202 после staging и записи задания, worker через RabbitMQ собирает thumbnail, crop и optimized и переживает разрыв до publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-09 01:08:24 +03:00
co-authored by Cursor
parent 9046d5206d
commit f2a3698480
24 changed files with 1579 additions and 82 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ async def add_message(
str(found[item]["chat_id"]) != chat_id for item in attachment_ids
):
return None, "not_found"
if any(found[item]["status"] != "ready" for item in attachment_ids):
if any(found[item]["status"] == "failed" for item in attachment_ids):
return None, "not_ready"
resolved = attachment_ids
message_id = uuid4()