]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Changes the type of the connection timeout to be an int, not a float 3576/head
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Mon, 12 Jun 2023 15:45:57 +0000 (08:45 -0700)
committerTrenton H <797416+stumpylog@users.noreply.github.com>
Mon, 12 Jun 2023 15:45:57 +0000 (08:45 -0700)
docs/configuration.md
src/paperless/settings.py

index da446401c429f95a8c61efcc9afa2044e2db6fdf..d3874256f9844a784f6976e822c1c6f837e42e21 100644 (file)
@@ -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 to
 unlock. Mostly applicable for sqlite based installation. Consider changing
index ad386e4104006844c2d7683cf33a81df346f654e..c18fd571705339552950ed5b5763b77556a24934 100644 (file)
@@ -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