mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Changes the type of the connection timeout to be an int, not a float
This commit is contained in:
parent
3d85dc1127
commit
dd6ae13281
@ -136,7 +136,7 @@ changed here.
|
|||||||
|
|
||||||
Defaults to unset, using the documented path in the home directory.
|
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
|
: Amount of time for a database connection to wait for the database to
|
||||||
unlock. Mostly applicable for sqlite based installation. Consider changing
|
unlock. Mostly applicable for sqlite based installation. Consider changing
|
||||||
|
@ -532,14 +532,14 @@ def _parse_db_settings() -> Dict:
|
|||||||
if os.getenv("PAPERLESS_DB_TIMEOUT") is not None:
|
if os.getenv("PAPERLESS_DB_TIMEOUT") is not None:
|
||||||
if databases["default"]["ENGINE"] == "django.db.backends.sqlite3":
|
if databases["default"]["ENGINE"] == "django.db.backends.sqlite3":
|
||||||
databases["default"]["OPTIONS"].update(
|
databases["default"]["OPTIONS"].update(
|
||||||
{"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
{"timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
databases["default"]["OPTIONS"].update(
|
databases["default"]["OPTIONS"].update(
|
||||||
{"connect_timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
{"connect_timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
||||||
)
|
)
|
||||||
databases["sqlite"]["OPTIONS"].update(
|
databases["sqlite"]["OPTIONS"].update(
|
||||||
{"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
{"timeout": int(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
||||||
)
|
)
|
||||||
return databases
|
return databases
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user