From 503f9e90aecdc92995f388986cb03cd056c3ea2a Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 16 Aug 2023 13:06:05 -0600 Subject: [PATCH] Removing secondary renderd map cache directory, if it exists. --- modules/map/lib.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/map/lib.py b/modules/map/lib.py index 2eab3588..a765fd77 100644 --- a/modules/map/lib.py +++ b/modules/map/lib.py @@ -216,7 +216,8 @@ def get_import_status(session: Session = None) -> List[MapFile]: return map_paths -MOD_TILE_CACHE_DIR = Path('/var/lib/mod_tile/ajt') +MOD_TILE_CACHE_DIR1 = Path('/var/lib/mod_tile/ajt') +MOD_TILE_CACHE_DIR2 = Path('/var/cache/renderd/tiles/ajt') @wrol_mode_check @@ -227,5 +228,7 @@ async def clear_mod_tile(): logger.warning('Clearing map tile cache files') - if MOD_TILE_CACHE_DIR.is_dir(): - await asyncio.create_subprocess_shell(f'rm -r {MOD_TILE_CACHE_DIR}') + if MOD_TILE_CACHE_DIR1.is_dir(): + await asyncio.create_subprocess_shell(f'rm -r {MOD_TILE_CACHE_DIR1}') + if MOD_TILE_CACHE_DIR2.is_dir(): + await asyncio.create_subprocess_shell(f'rm -r {MOD_TILE_CACHE_DIR2}')