always run the new mkdir command in process updates

This commit is contained in:
Laura Klünder 2024-09-17 03:05:59 +02:00
parent cdd40fb0fc
commit e642507210

View file

@ -175,13 +175,13 @@ class MapUpdate(models.Model):
if not new_updates: if not new_updates:
return () return ()
update_cache_key = MapUpdate.build_cache_key(*new_updates[-1].to_tuple)
(settings.CACHE_ROOT / update_cache_key).mkdir()
if any(update.geometries_changed for update in new_updates): if any(update.geometries_changed for update in new_updates):
from c3nav.mapdata.utils.cache.changes import changed_geometries from c3nav.mapdata.utils.cache.changes import changed_geometries
changed_geometries.reset() changed_geometries.reset()
update_cache_key = MapUpdate.build_cache_key(*new_updates[-1].to_tuple)
(settings.CACHE_ROOT / update_cache_key).mkdir()
logger.info('Recalculating altitude areas...') logger.info('Recalculating altitude areas...')
from c3nav.mapdata.models import AltitudeArea from c3nav.mapdata.models import AltitudeArea