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
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