fix: a PDF's resolution is worked out at the scan, not at checkout

create_quote downloaded every PDF sheet (up to 150 MB) and parsed it inside
the customer's request, behind nginx's 30 s. The worker's scan already reads
every upload before the Site lets the customer continue, so it now stores
the PDF's DPI on the upload (uploads.pdf_checked, pdf_dpi) and the checkout
reads the number. An upload scanned before this, or whose work-out failed,
is read at checkout as before (Critical Corrections 2, step 2).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-10 10:47:08 -03:00
parent 17463c0298
commit 29b79db806
5 changed files with 65 additions and 10 deletions

View File

@@ -0,0 +1,4 @@
-- The PDF's resolution, worked out at the scan (Critical Corrections 2): pdf_checked
-- false = not worked out yet (checkout reads as before), NULL pdf_dpi with it true = unreadable.
ALTER TABLE dtf_local.uploads ADD COLUMN IF NOT EXISTS pdf_checked boolean NOT NULL DEFAULT false;
ALTER TABLE dtf_local.uploads ADD COLUMN IF NOT EXISTS pdf_dpi integer;