feat: the proof card, machine pull and print file corrections (Dropstar, 05/11)

The proof card owns its final PNG, keeps its parent locked until the seller
answers, enters the queue first, and shares one machine with the parent.
The board no longer assigns a machine at payment; the puller records it.
A stalled print file times out with a card warning and a retry, finished
orders sort by completion, and finals are stored as PNG. The original
download carries the order number (items 0.1, 0.4 to 0.7 and 0.9).
This commit is contained in:
Cauê Faleiros
2026-11-06 10:41:20 -03:00
parent 0fc01315c7
commit d69e326125
20 changed files with 584 additions and 220 deletions

View File

@@ -9,7 +9,8 @@ from uuid import UUID, uuid4
from fastapi import HTTPException
from .runtime import upload_row
from .runtime import upload_row, storage
from .printpng_validate import require_final_png
from .scanning import require_clean
@@ -84,6 +85,8 @@ def submit_files(c, order, body, identity, kind, actor):
if not upload['complete']:
raise HTTPException(409, 'Espere o envio de todos os arquivos terminar.')
require_clean(upload)
if kind == 'final':
require_final_png(storage, upload)
# Attached once, except a correction approved as its own final.
if c.execute('SELECT id FROM dtf_local.order_files WHERE upload_id=%s'+(" AND kind<>'correction'" if corrected else ''),
(ref.upload_id,)).fetchone():