From 7dd6b68da83fd691e8c13d2045ba508cf714bae4 Mon Sep 17 00:00:00 2001 From: gluap Date: Sat, 10 Jun 2023 13:00:45 +0200 Subject: [PATCH] fix percentage logging --- api/tools/import_osm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tools/import_osm.py b/api/tools/import_osm.py index 84be8af..68808ce 100755 --- a/api/tools/import_osm.py +++ b/api/tools/import_osm.py @@ -74,7 +74,7 @@ async def import_osm(connection, filename, import_group=None): amount = 0 for items in chunk(read_file(filename), 10000): amount += 10000 - log.info(f"...{amount}/{len(ids)} ({100*amount/len(ids)}%)") + log.info(f"...{amount}/{len(road_ids)} ({100*amount/len(road_ids)}%)") async with cursor.copy( "COPY road (way_id, name, zone, directionality, oneway, geometry, import_group) FROM STDIN" ) as copy: