Skip to content
Snippets Groups Projects
Commit 7ef9fd1c authored by thomaswoehlke's avatar thomaswoehlke
Browse files

### 0.0.8 Release

* Fixed #13 /who/imported/
* Fixed #14 /europe/imported/
* Fixed #15 /who/update: Download
* Fixed #16 /who/update: Import File to DB
* Issue #17 /who/update: Update DB
* Issue #3 ORM: 3NF for ecdc_europa_data_import
* Issue #4 data update for 3NF ecdc_europa_data_import
parent 38ca7aed
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ class EuropeDataImportTable(db.Model): ...@@ -37,7 +37,7 @@ class EuropeDataImportTable(db.Model):
@classmethod @classmethod
def get_date_rep(cls): def get_date_rep(cls):
sql = "select distinct date_rep, year_week from europe_data_import order by year_week desc" sql = "select distinct date_rep, year_week from europe_data_import order by year_week desc"
return db.session.execute(sql).all() return db.session.execute(sql)
class EuropeDateReported(db.Model): class EuropeDateReported(db.Model):
......
...@@ -19,12 +19,16 @@ class EuropeServiceUpdate: ...@@ -19,12 +19,16 @@ class EuropeServiceUpdate:
app.logger.info(" Europe Service Update [ready] ") app.logger.info(" Europe Service Update [ready] ")
def __update_date_reported(self): def __update_date_reported(self):
app.logger.info(" __update_date_reported [begin]")
app.logger.info("------------------------------------------------------------")
EuropeDataImportTable.remove_all() EuropeDataImportTable.remove_all()
result = EuropeDataImportTable.get_date_rep() result_date_rep = EuropeDataImportTable.get_date_rep()
for result_item in result.items: for result_item in result_date_rep:
my_date_rep = result_item['date_rep'] my_date_rep = result_item['date_rep']
year_week = result_item['year_week'] year_week = result_item['year_week']
app.logger.info("| "+my_date_rep+" | "+year_week+" |") app.logger.info("| "+my_date_rep+" | "+year_week+" |")
app.logger.info(" __update_date_reported [done]")
app.logger.info("------------------------------------------------------------")
return self return self
def update_db(self): def update_db(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment