mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Merge branch 'dev' into feature-use-celery
This commit is contained in:
@@ -127,10 +127,10 @@ def settings_values_check(app_configs, **kwargs):
|
||||
Error(f'OCR output type "{settings.OCR_OUTPUT_TYPE}" is not valid'),
|
||||
)
|
||||
|
||||
if settings.OCR_MODE not in {"force", "skip", "redo_ocr"}:
|
||||
if settings.OCR_MODE not in {"force", "skip", "redo", "skip_noarchive"}:
|
||||
msgs.append(Error(f'OCR output mode "{settings.OCR_MODE}" is not valid'))
|
||||
|
||||
if settings.OCR_CLEAN not in {"clean", "clean_final"}:
|
||||
if settings.OCR_CLEAN not in {"clean", "clean-final", "none"}:
|
||||
msgs.append(Error(f'OCR clean mode "{settings.OCR_CLEAN}" is not valid'))
|
||||
return msgs
|
||||
|
||||
|
@@ -322,6 +322,7 @@ DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": os.path.join(DATA_DIR, "db.sqlite3"),
|
||||
"OPTIONS": {},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -343,21 +344,18 @@ if os.getenv("PAPERLESS_DBHOST"):
|
||||
# Leave room for future extensibility
|
||||
if os.getenv("PAPERLESS_DBENGINE") == "mariadb":
|
||||
engine = "django.db.backends.mysql"
|
||||
options = {"read_default_file": "/etc/mysql/my.cnf"}
|
||||
options = {"read_default_file": "/etc/mysql/my.cnf", "charset": "utf8mb4"}
|
||||
else: # Default to PostgresDB
|
||||
engine = "django.db.backends.postgresql_psycopg2"
|
||||
options = {"sslmode": os.getenv("PAPERLESS_DBSSLMODE", "prefer")}
|
||||
|
||||
DATABASES["default"]["ENGINE"] = engine
|
||||
for key, value in options.items():
|
||||
DATABASES["default"]["OPTIONS"][key] = value
|
||||
DATABASES["default"]["OPTIONS"].update(options)
|
||||
|
||||
if os.getenv("PAPERLESS_DB_TIMEOUT") is not None:
|
||||
_new_opts = {"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))}
|
||||
if "OPTIONS" in DATABASES["default"]:
|
||||
DATABASES["default"]["OPTIONS"].update(_new_opts)
|
||||
else:
|
||||
DATABASES["default"]["OPTIONS"] = _new_opts
|
||||
DATABASES["default"]["OPTIONS"].update(
|
||||
{"timeout": float(os.getenv("PAPERLESS_DB_TIMEOUT"))},
|
||||
)
|
||||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from typing import Final
|
||||
from typing import Tuple
|
||||
|
||||
__version__: Final[Tuple[int, int, int]] = (1, 9, 0)
|
||||
__version__: Final[Tuple[int, int, int]] = (1, 9, 2)
|
||||
# Version string like X.Y.Z
|
||||
__full_version_str__: Final[str] = ".".join(map(str, __version__))
|
||||
# Version string like X.Y
|
||||
|
Reference in New Issue
Block a user