From 4477e5d22a32b858fd76e51aab2efa7e84a24132 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 28 Apr 2021 20:59:53 +0200 Subject: [PATCH] change log msg --- web/db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/db.py b/web/db.py index 5d8c41e..8eab1aa 100644 --- a/web/db.py +++ b/web/db.py @@ -153,14 +153,15 @@ class Database: nb_null = conn.execute( "SELECT COUNT(1) FROM position WHERE altitude IS NULL;").fetchone()[0] if nb_null > max_pos_by_req: - logger.warning("There is %s to fetch from API, it can take some time") + logger.warning("There is %s to fetch from API, it can take some time", nb_null) try: while True: res = conn.execute(f"SELECT DISTINCT latitude,longitude " f"FROM position WHERE altitude IS NULL LIMIT {max_pos_by_req};").fetchall() nb_res = len(res) if nb_res > 0: - logger.info("add altitude for %s", len(res)) + logger.debug("add altitude for %s positions point", len(nb_null)) + nb_null -= nb_res locations_str = "" for line in res: locations_str += str(line[0]) + "," + str(line[1]) + "|"