Clearing map cache files if any import was successful.

This commit is contained in:
Roland 2022-03-09 20:22:09 -07:00
parent 67fba510dc
commit f08292de56
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -97,11 +97,10 @@ async def import_pbfs(pbfs: List[str]):
with get_db_session(commit=True) as session:
map_file = get_or_create_map_file(pbf, session)
map_file.imported = True
finally:
if any_success:
# A map was imported, remove the tile cache files.
clear_mod_tile()
finally:
IMPORT_EVENT.clear()