mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Updates the httpx timeout to be 30s for all operations
This commit is contained in:
		@@ -218,7 +218,7 @@ class MailDocumentParser(DocumentParser):
 | 
			
		||||
                        file_multi_part[2],
 | 
			
		||||
                    )
 | 
			
		||||
 | 
			
		||||
                response = httpx.post(url_merge, files=pdf_collection)
 | 
			
		||||
                response = httpx.post(url_merge, files=pdf_collection, timeout=30.0)
 | 
			
		||||
                response.raise_for_status()  # ensure we notice bad responses
 | 
			
		||||
 | 
			
		||||
                archive_path.write_bytes(response.content)
 | 
			
		||||
@@ -336,6 +336,7 @@ class MailDocumentParser(DocumentParser):
 | 
			
		||||
                    files=files,
 | 
			
		||||
                    headers=headers,
 | 
			
		||||
                    data=data,
 | 
			
		||||
                    timeout=30.0,
 | 
			
		||||
                )
 | 
			
		||||
                response.raise_for_status()  # ensure we notice bad responses
 | 
			
		||||
            except Exception as err:
 | 
			
		||||
@@ -414,11 +415,7 @@ class MailDocumentParser(DocumentParser):
 | 
			
		||||
                    file_multi_part[2],
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
            response = httpx.post(
 | 
			
		||||
                url,
 | 
			
		||||
                files=files,
 | 
			
		||||
                data=data,
 | 
			
		||||
            )
 | 
			
		||||
            response = httpx.post(url, files=files, data=data, timeout=30.0)
 | 
			
		||||
            response.raise_for_status()  # ensure we notice bad responses
 | 
			
		||||
        except Exception as err:
 | 
			
		||||
            raise ParseError(f"Error while converting document to PDF: {err}") from err
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,13 @@ class TikaDocumentParser(DocumentParser):
 | 
			
		||||
                data["pdfFormat"] = "PDF/A-3b"
 | 
			
		||||
 | 
			
		||||
            try:
 | 
			
		||||
                response = httpx.post(url, files=files, headers=headers, data=data)
 | 
			
		||||
                response = httpx.post(
 | 
			
		||||
                    url,
 | 
			
		||||
                    files=files,
 | 
			
		||||
                    headers=headers,
 | 
			
		||||
                    data=data,
 | 
			
		||||
                    timeout=30.0,
 | 
			
		||||
                )
 | 
			
		||||
                response.raise_for_status()  # ensure we notice bad responses
 | 
			
		||||
            except Exception as err:
 | 
			
		||||
                raise ParseError(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user