calcglobalstats: Add missing MySQL commit

The commit was missing after the MySQL queries, leaving e.g. updated
V2 Hoods unchanged in the database.

Add commit for individual function and for the script to be sure
nothing else is overlooked.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2021-01-13 14:23:34 +01:00
parent 1ad0c7d532
commit 386ffce1c5
2 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,8 @@ def update_hoods_v2(mysql):
lng=VALUES(lng)
""",kx_data)
mysql.commit()
except urllib.error.HTTPError as e:
return

View File

@ -26,6 +26,7 @@ record_global_stats(influ,mysql)
record_hood_stats(influ,mysql)
record_gw_stats(influ,mysql)
update_mapnik_csv(mysql)
mysql.commit()
mysql.close()
print("--- %.3f seconds ---" % (time.time() - start_time))