Workaround for the OCR task-inside-task issue

Thanks to Jakob Haufe (@sur5r) for the solution.
2423254aa4

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-07-24 02:25:49 -04:00
parent 0c3b6e5388
commit fac77a2f73

View File

@@ -35,7 +35,7 @@ class DocumentPageOCRContentManager(models.Manager):
)
)
cache_filename = task.get(timeout=DOCUMENT_IMAGE_TASK_TIMEOUT)
cache_filename = task.get(timeout=DOCUMENT_IMAGE_TASK_TIMEOUT, disable_sync_subtasks=False)
with document_page.cache_partition.get_file(filename=cache_filename).open() as file_object:
document_page_content, created = DocumentPageOCRContent.objects.get_or_create(