mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-01 04:25:44 +00:00
Chore: Improve idle memory via more lazy imports (#14599)
* Chore: Import dateparser lazily so processes that never parse dates skip it * Chore: Import turbohtml lazily in the mail parser * Chore: Import lxml lazily in the SVG validator * Chore: Import paperless_ai.indexing lazily in document tasks * Chore: Import paperless_ai helpers lazily in views * Chore: Read the OCRmyPDF sRGB profile on first use instead of at import * Chore: Import pikepdf and img2pdf lazily so startup does not load them * Chore: Reuse the initialized Django ASGI application for HTTP routing
This commit is contained in:
1 parent
a5d3247ca7
commit
6f99ad9469
24 files changed
+110
-73
No files matched your search
@@ -2686,7 +2686,7 @@ class TestDocumentApi(DirectoriesMixin, ConsumeTaskMixin, APITestCase):
|
||||
response = self.client.get("/api/documents/34676/suggestions/")
|
||||
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
|
||||
|
||||
@mock.patch("documents.views.get_ai_document_classification")
|
||||
@mock.patch("paperless_ai.ai_classifier.get_ai_document_classification")
|
||||
@override_settings(AI_ENABLED=True)
|
||||
def test_suggestions_still_uses_classifier_when_ai_enabled(
|
||||
self,
|
||||
|
||||
Reference in new issue
Block a user