File tree Expand file tree Collapse file tree
opendrift_leeway_webgui/leeway Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import logging
22import os
33import subprocess
4- from datetime import timedelta
54from pathlib import Path
65
76import requests as http_requests
@@ -133,15 +132,3 @@ def download_icon_weather_data():
133132 for frt in frts :
134133 download_and_merge (frt )
135134 logger .info ("EU ICON weather data download completed." )
136-
137- # Clean old simulations
138- logger .info ("Cleaning old simulation data." )
139- for simulation in apps .get_model (app_label = "leeway" , model_name = "LeewaySimulation" ).objects .filter (
140- start_time__lt = timezone .now () - timedelta (days = settings .SIMULATION_RETENTION )
141- ):
142- logger .info ("Removed simulation %s." , simulation .uuid )
143- if simulation .img :
144- simulation .img .delete ()
145- if simulation .netcdf :
146- simulation .netcdf .delete ()
147- simulation .delete ()
You can’t perform that action at this time.
0 commit comments