Backend work for proper bulk zone ocr

This commit is contained in:
shamoon committed 2026-10-20 10:20:28 -07:00
1 parent 7d9b8c770d
commit 8bb2f88015
8 files changed
+179

No files matched your search

+7
View File
@@ -69,6 +69,7 @@ from documents.utils import compute_checksum
from documents.utils import identity
from documents.versioning import annotate_effective_content
from documents.workflows.utils import get_workflows_for_trigger
from documents.zone_ocr import run_zone_extraction
from paperless.config import AIConfig
from paperless.config import BarcodeConfig
from paperless.config import RemoteOCRConfig
@@ -368,6 +369,12 @@ def _read_barcodes_for_reprocess(document: Document) -> list[StoredBarcode] | No
return None
@shared_task
def extract_zones(document_id: int) -> None:
"""Run the document type's enabled OCR templates against a stored document."""
run_zone_extraction(Document.objects.get(id=document_id), None)
@shared_task
def update_document_content_maybe_archive_file(
document_id,