Add pre-cleaning to a couple of zip files during geo-score (#2151)

Two zip files were not getting cleared prior to running geo score. This was resulting in them growing between runs until the application ground to a halt. This fix clears those two zip files before geo score and before the full run.
This commit is contained in:
Travis Newby 2023-02-06 12:43:12 -06:00 committed by GitHub
commit 9ba4e790a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -22,6 +22,7 @@ from data_pipeline.utils import downloadable_cleanup
from data_pipeline.utils import get_module_logger
from data_pipeline.utils import score_folder_cleanup
from data_pipeline.utils import temp_folder_cleanup
from data_pipeline.utils import geo_score_folder_cleanup
logger = get_module_logger(__name__)
@ -58,6 +59,7 @@ def data_cleanup():
tribal_reset(data_path)
score_folder_cleanup()
temp_folder_cleanup()
geo_score_folder_cleanup()
logger.info("Cleaned up all data folders")
sys.exit()
@ -179,6 +181,7 @@ def geo_score(data_source: str):
None
"""
geo_score_folder_cleanup()
score_geo(data_source=data_source)
sys.exit()