A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Sets the http timeouts equal to the task timeout, so it's either done or really done
Trenton Holmesfe1f88ce5d15
diff --git a/src/paperless_mail/parsers.py b/src/paperless_mail/parsers.pyindex 4365d21a4..da9259a69 100644--- a/src/paperless_mail/parsers.py+++ b/src/paperless_mail/parsers.py@@ -215,7 +215,11 @@ class MailDocumentParser(DocumentParser):file_multi_part[2],)- response = httpx.post(url_merge, files=pdf_collection, timeout=30.0)+ response = httpx.post(+ url_merge,+ files=pdf_collection,+ timeout=settings.CELERY_TASK_TIME_LIMIT,+ )response.raise_for_status() # ensure we notice bad responsesarchive_path.write_bytes(response.content)@@ -330,7 +334,7 @@ class MailDocumentParser(DocumentParser):files=files,headers=headers,data=data,- timeout=30.0,+ timeout=settings.CELERY_TASK_TIME_LIMIT,)response.raise_for_status() # ensure we notice bad responsesexcept Exception as err:@@ -409,7 +413,12 @@ class MailDocumentParser(DocumentParser):file_multi_part[2],)- response = httpx.post(url, files=files, data=data, timeout=30.0)+ response = httpx.post(+ url,+ files=files,+ data=data,+ timeout=settings.CELERY_TASK_TIME_LIMIT,+ )response.raise_for_status() # ensure we notice bad responsesexcept Exception as err:raise ParseError(f"Error while converting document to PDF: {err}") from errdiff --git a/src/paperless_tika/parsers.py b/src/paperless_tika/parsers.pyindex b6a9dd621..402a37215 100644--- a/src/paperless_tika/parsers.py+++ b/src/paperless_tika/parsers.py@@ -100,7 +100,7 @@ class TikaDocumentParser(DocumentParser):files=files,headers=headers,data=data,- timeout=30.0,+ timeout=settings.CELERY_TASK_TIME_LIMIT,)response.raise_for_status() # ensure we notice bad responsesexcept Exception as err: