Skip to content

Commit

Permalink
Update BODC_tables_generator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilrader authored Sep 17, 2024
1 parent 1adbdda commit f9c99e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/BODC_tables_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def execute_to_df(name: str, **vars) -> pd.DataFrame:
BODCvalues=BODCvalues.drop(columns='index')
BODCvalues.to_csv(bodc_values_file,index=False)
# Clean up old files, keep latest 3
filesList = sorted([f for f in checkpoint_path.iterdir() if 'BODCvalues' in f.name], reverse=True)
if len(filesList) > 3:
filesList = sorted([f for f in checkpoint_path.iterdir() if 'BODCvalues' in f.name], reverse=True)
if len(filesList) > 3:
for file in filesList[3:]:
file.unlink()

Expand Down

0 comments on commit f9c99e6

Please sign in to comment.