mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-26 15:07:38 +00:00
Fix: queue single document zone OCR runs instead of running them in the request
Rendering and OCR ran inside the HTTP request and could block other requests for minutes. The action now validates, then queues the bulk zone OCR operation for the selected file and returns its task id.
This commit is contained in:
1 parent
a6b81b2d64
commit
c5fdba73a1
11 files changed
+379
-483
No files matched your search
@@ -1966,7 +1966,12 @@ class TestBulkEditRunZoneOcr:
|
||||
|
||||
assert result == "OK"
|
||||
assert mock_extract_zones.call_args_list == [
|
||||
mocker.call(document_id=doc.id, template_id=None, requester=user)
|
||||
mocker.call(
|
||||
document_id=doc.id,
|
||||
template_id=None,
|
||||
requester=user,
|
||||
resolve_latest=True,
|
||||
)
|
||||
for doc in docs
|
||||
]
|
||||
mock_extract_zones.apply_async.assert_not_called()
|
||||
@@ -1993,6 +1998,7 @@ class TestBulkEditRunZoneOcr:
|
||||
document_id=doc.id,
|
||||
template_id=template.pk,
|
||||
requester=None,
|
||||
resolve_latest=True,
|
||||
)
|
||||
mock_extract_zones.apply_async.assert_not_called()
|
||||
|
||||
|
||||
Reference in new issue
Block a user