A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Changes the type of the connection timeout to be an int, not a float
Trenton Hdd6ae1328100
diff --git a/docs/configuration.md b/docs/configuration.mdindex da446401c..d3874256f 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -136,7 +136,7 @@ changed here.Defaults to unset, using the documented path in the home directory.-`PAPERLESS_DB_TIMEOUT=<float>`+`PAPERLESS_DB_TIMEOUT=<int>`: Amount of time for a database connection to wait for the database tounlock. Mostly applicable for sqlite based installation. Consider changingdiff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex ad386e410..c18fd5717 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -532,14 +532,14 @@ def _parse_db_settings() -> Dict:if os.getenv("PAPERLESS_DB_TIMEOUT") is not None:if databases["default"]["ENGINE"] == "django.db.backends.sqlite3":databases["default"]["OPTIONS"].update(- {"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},+ {"timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},)else:databases["default"]["OPTIONS"].update(- {"connect_timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},+ {"connect_timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},)databases["sqlite"]["OPTIONS"].update(- {"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},+ {"timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},)return databases