mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-06 21:13:43 -05:00
Ok, maybe not using the manifest
This commit is contained in:
@@ -13,7 +13,6 @@ from pathlib import Path
|
|||||||
|
|
||||||
import brotli
|
import brotli
|
||||||
import humanize
|
import humanize
|
||||||
from django.contrib.staticfiles.storage import ManifestFilesMixin
|
|
||||||
from django.contrib.staticfiles.storage import StaticFilesStorage
|
from django.contrib.staticfiles.storage import StaticFilesStorage
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -29,16 +28,7 @@ class FileInfo:
|
|||||||
brotli_size: int | None = None
|
brotli_size: int | None = None
|
||||||
|
|
||||||
|
|
||||||
class DeduplicatedCompressedStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage):
|
class DeduplicatedCompressedStaticFilesStorage(StaticFilesStorage):
|
||||||
"""
|
|
||||||
Django 5.2 compatible staticfiles storage that:
|
|
||||||
1. Deduplicates identical files by linking them to a single original
|
|
||||||
2. Compresses files using Brotli and GZip with ThreadPoolExecutor
|
|
||||||
3. Handles --clear --no-input --link options properly
|
|
||||||
4. Uses parallel processing for hashing and compression
|
|
||||||
5. Tracks and reports total original and compressed file sizes.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# File extensions that should be compressed
|
# File extensions that should be compressed
|
||||||
COMPRESSIBLE_EXTENSIONS = {
|
COMPRESSIBLE_EXTENSIONS = {
|
||||||
".css",
|
".css",
|
||||||
|
Reference in New Issue
Block a user