Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
index-git committed Oct 12, 2023
1 parent a10c5d1 commit 1f02e42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layman/upgrade/upgrade_v1_22.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def insert_map_layer_relations():
maps = db_util.run_query(query, (MAP_TYPE, ))

for map_id, workspace, map_name in maps:
logger.info(f' Import map-layer relations for map {workspace}.{map_name}')
map_file_path = os.path.join(settings.LAYMAN_DATA_DIR, 'workspaces', workspace, 'maps', map_name, 'input_file', map_name + '.json')
try:
with open(map_file_path, 'r', encoding="utf-8") as map_file:
Expand All @@ -103,4 +104,4 @@ def insert_map_layer_relations():
insert into {DB_SCHEMA}.map_layer(id_map, layer_workspace, layer_name, layer_index) values (%s, %s, %s, %s);
'''
db_util.run_statement(insert_query, (map_id, layer_workspace, layer_name, layer_index, ))
logger.info(f' Number of imported map-layer relations for map {workspace}.{map_name}: {len(map_layers)}')
logger.info(f' Number of imported relations: {len(map_layers)}')

0 comments on commit 1f02e42

Please sign in to comment.