Use one thread for each domain when grabbing entries

This commit is contained in:
Joakim Hellsén 2024-03-17 23:36:56 +01:00
commit c3ebd9faa2
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
4 changed files with 121 additions and 28 deletions

View file

@ -46,11 +46,6 @@ WSGI_APPLICATION = "feedvault.wsgi.application"
NINJA_PAGINATION_PER_PAGE = 1000
STATIC_URL = "static/"
STATIC_ROOT: Path = BASE_DIR / "staticfiles"
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.StaticFilesStorage"
if TESTING
else "whitenoise.storage.CompressedManifestStaticFilesStorage"
)
STATIC_ROOT.mkdir(parents=True, exist_ok=True)
MEDIA_URL = "media/"
MEDIA_ROOT: Path = BASE_DIR / "media"
@ -87,11 +82,12 @@ MIDDLEWARE: list[str] = [
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
database_folder: Path = BASE_DIR / "data"
database_folder.mkdir(parents=True, exist_ok=True)
DATABASES: dict[str, dict[str, str | Path | bool]] = {
DATABASES: dict[str, dict[str, str | Path | bool | int]] = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": database_folder / "feedvault.sqlite3",
"ATOMIC_REQUESTS": True,
"timeout": 30,
},
}
@ -184,6 +180,8 @@ STORAGES: dict[str, dict[str, str]] = {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"
if TESTING
else "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}