Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flask-covid19
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Wöhlke
flask-covid19
Commits
7f6c5787
Commit
7f6c5787
authored
3 years ago
by
thomaswoehlke
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring: vaccination
parent
2d5804a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!162
Refactoring 2021 05 20 start
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/flask_covid19/blueprints/app_all/all_model.py
+7
-0
7 additions, 0 deletions
src/flask_covid19/blueprints/app_all/all_model.py
src/flask_covid19/blueprints/data_rki/rki_service_update.py
+17
-17
17 additions, 17 deletions
src/flask_covid19/blueprints/data_rki/rki_service_update.py
with
24 additions
and
17 deletions
src/flask_covid19/blueprints/app_all/all_model.py
+
7
−
0
View file @
7f6c5787
...
@@ -21,6 +21,13 @@ class BlueprintEntity(db.Model):
...
@@ -21,6 +21,13 @@ class BlueprintEntity(db.Model):
db
.
session
.
rollback
()
db
.
session
.
rollback
()
return
num_rows_deleted
return
num_rows_deleted
@classmethod
def
delete_all
(
cls
):
for
o
in
cls
.
find_all
():
o
.
remove
()
db
.
session
.
commit
()
return
None
@classmethod
@classmethod
def
get_all_as_page
(
cls
,
page
:
int
):
def
get_all_as_page
(
cls
,
page
:
int
):
return
db
.
session
.
query
(
cls
)
\
return
db
.
session
.
query
(
cls
)
\
...
...
This diff is collapsed.
Click to expand it.
src/flask_covid19/blueprints/data_rki/rki_service_update.py
+
17
−
17
View file @
7f6c5787
...
@@ -22,7 +22,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -22,7 +22,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
def
__full_update_date_datenstand
(
self
):
def
__full_update_date_datenstand
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_datenstand [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_datenstand [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiDatenstand
.
remov
e_all
()
RkiDatenstand
.
delet
e_all
()
i
=
0
i
=
0
output_lines
=
[]
output_lines
=
[]
for
datum_of_import
in
RkiImport
.
get_date_datenstand_of_all_import
():
for
datum_of_import
in
RkiImport
.
get_date_datenstand_of_all_import
():
...
@@ -42,7 +42,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -42,7 +42,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
def
__full_update_date_ref_datum
(
self
):
def
__full_update_date_ref_datum
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_ref_datum [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_ref_datum [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiRefDatum
.
remov
e_all
()
RkiRefDatum
.
delet
e_all
()
i
=
0
i
=
0
output_lines
=
[]
output_lines
=
[]
for
datum_of_import
in
RkiImport
.
get_date_ref_datum_of_all_import
():
for
datum_of_import
in
RkiImport
.
get_date_ref_datum_of_all_import
():
...
@@ -62,7 +62,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -62,7 +62,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
def
__full_update_date_reported
(
self
):
def
__full_update_date_reported
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_reported [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_date_reported [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiMeldedatum
.
remov
e_all
()
RkiMeldedatum
.
delet
e_all
()
i
=
0
i
=
0
output_lines
=
[]
output_lines
=
[]
for
datum_of_import
in
RkiImport
.
get_meldedatum_list
():
for
datum_of_import
in
RkiImport
.
get_meldedatum_list
():
...
@@ -85,7 +85,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -85,7 +85,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
def
__full_update_altersgruppe
(
self
):
def
__full_update_altersgruppe
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_altersgruppe [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_altersgruppe [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiAltersgruppe
.
remov
e_all
()
RkiAltersgruppe
.
delet
e_all
()
app
.
logger
.
info
(
""
)
app
.
logger
.
info
(
""
)
i
=
0
i
=
0
output_lines
=
[]
output_lines
=
[]
...
@@ -108,13 +108,13 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -108,13 +108,13 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
return
self
return
self
def
__clean_bundesland
(
self
):
def
__clean_bundesland
(
self
):
RkiBundesland
.
remov
e_all
()
RkiBundesland
.
delet
e_all
()
return
self
return
self
def
__full_update_bundesland
(
self
):
def
__full_update_bundesland
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_bundesland [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_bundesland [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiBundesland
.
remov
e_all
()
RkiBundesland
.
delet
e_all
()
app
.
logger
.
info
(
""
)
app
.
logger
.
info
(
""
)
i
=
0
i
=
0
output_lines
=
[]
output_lines
=
[]
...
@@ -139,12 +139,12 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -139,12 +139,12 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
return
self
return
self
def
__clean_landkreis
(
self
):
def
__clean_landkreis
(
self
):
RkiLandkreis
.
remov
e_all
()
RkiLandkreis
.
delet
e_all
()
self
.
__clean_bundesland
()
self
.
__clean_bundesland
()
return
self
return
self
def
__full_update_landkreis
(
self
):
def
__full_update_landkreis
(
self
):
RkiLandkreis
.
remov
e_all
()
RkiLandkreis
.
delet
e_all
()
self
.
__full_update_bundesland
()
self
.
__full_update_bundesland
()
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_landkreis [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_landkreis [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
...
@@ -179,13 +179,13 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -179,13 +179,13 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
return
self
return
self
def
__clean_data
(
self
):
def
__clean_data
(
self
):
RkiData
.
remov
e_all
()
RkiData
.
delet
e_all
()
return
self
return
self
def
__full_update_data
(
self
):
def
__full_update_data
(
self
):
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_data [begin]
"
)
app
.
logger
.
info
(
"
RkiServiceUpdateFull.__full_update_data [begin]
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
RkiData
.
remov
e_all
()
RkiData
.
delet
e_all
()
i
=
0
i
=
0
d
=
0
d
=
0
k
=
0
k
=
0
...
@@ -267,12 +267,12 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -267,12 +267,12 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
return
self
return
self
def
__clean_dimension_tables
(
self
):
def
__clean_dimension_tables
(
self
):
RkiMeldedatum
.
remov
e_all
()
RkiMeldedatum
.
delet
e_all
()
RkiDatenstand
.
remov
e_all
()
RkiDatenstand
.
delet
e_all
()
RkiRefDatum
.
remov
e_all
()
RkiRefDatum
.
delet
e_all
()
RkiAltersgruppe
.
remov
e_all
()
RkiAltersgruppe
.
delet
e_all
()
RkiLandkreis
.
remov
e_all
()
RkiLandkreis
.
delet
e_all
()
RkiBundesland
.
remov
e_all
()
RkiBundesland
.
delet
e_all
()
return
self
return
self
def
full_update_dimension_tables
(
self
):
def
full_update_dimension_tables
(
self
):
...
@@ -286,7 +286,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
...
@@ -286,7 +286,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
return
self
return
self
def
__clean_fact_table
(
self
):
def
__clean_fact_table
(
self
):
RkiData
.
remov
e_all
()
RkiData
.
delet
e_all
()
return
self
return
self
def
full_update_fact_table
(
self
):
def
full_update_fact_table
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment