From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:45:57 +0000 (-0700) Subject: Changes the type of the connection timeout to be an int, not a float X-Git-Tag: v1.16.0~1^2~9^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3576%2Fhead;p=thirdparty%2Fpaperless-ngx.git Changes the type of the connection timeout to be an int, not a float --- diff --git a/docs/configuration.md b/docs/configuration.md index da446401c4..d3874256f9 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=` +`PAPERLESS_DB_TIMEOUT=` : Amount of time for a database connection to wait for the database to unlock. Mostly applicable for sqlite based installation. Consider changing diff --git a/src/paperless/settings.py b/src/paperless/settings.py index ad386e4104..c18fd57170 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