cache package download wants some fixing

This commit is contained in:
Laura Klünder 2024-09-17 18:02:27 +02:00
parent e1ee9bdcf5
commit 1aaeaef386

View file

@ -452,13 +452,13 @@ def map_history(request, level, mode, filetype):
return response return response
@etag(lambda *args, **kwargs: MapUpdate.current_processed_cache_key()) @etag(lambda *args, **kwargs: MapUpdate.current_processed_geometry_cache_key())
@no_language() @no_language()
def get_cache_package(request, filetype): def get_cache_package(request, filetype):
enforce_tile_secret_auth(request) enforce_tile_secret_auth(request)
filename = 'package.' + filetype filename = 'package.' + filetype
cache_package = CachePackage.get_filename(MapUpdate.current_processed_cache_key(), cache_package = CachePackage.get_filename(MapUpdate.current_processed_geometry_cache_key(),
filetype[4:] if filetype != 'tar' else None) filetype[4:] if filetype != 'tar' else None)
try: try:
size = cache_package.stat().st_size size = cache_package.stat().st_size