From b4f230935a6992bd23e6991cafc66816115f5b46 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Wed, 26 May 2021 19:08:10 +0200 Subject: [PATCH] Refactoring: vaccination --- .../blueprints/data_rki/rki_service_update.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/flask_covid19/blueprints/data_rki/rki_service_update.py b/src/flask_covid19/blueprints/data_rki/rki_service_update.py index 9a4d6923..956f6ca2 100644 --- a/src/flask_covid19/blueprints/data_rki/rki_service_update.py +++ b/src/flask_covid19/blueprints/data_rki/rki_service_update.py @@ -199,7 +199,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): for my_meldedatum in RkiMeldedatum.find_all(): my_meldedatum_datum = my_meldedatum.datum for my_landkreis in RkiLandkreis.find_all(): - my_landkreis_key = my_landkreis.location_type() + " " + my_landkreis.location + my_landkreis_key = my_landkreis.location_type + " " + my_landkreis.location # app.logger.info(" my_meldedatum: " + str(my_meldedatum) + " " + d.isoformat()) # app.logger.info("------------------------------------------------------------") list_imports = RkiImport.find_by_meldedatum_and_landkreis( @@ -244,12 +244,12 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase): db.session.add(o) k += 1 i += 1 - d += 1 - if d % 7 == 0: - db.session.commit() - sd = str(my_meldedatum) - app.logger.info(" full update RKI data ... " + str(i) + " rows ... " + sd + " (" + str(k) + ")") - k = 0 + d += 1 + if d % 7 == 0: + db.session.commit() + sd = str(my_meldedatum) + app.logger.info(" full update RKI data ... " + str(i) + " rows ... " + sd + " (" + str(k) + ")") + k = 0 db.session.commit() app.logger.info(" full update RKI data ... " + str(i) + " total rows") app.logger.info("") -- GitLab