ecmwf: don't run ingest if dowload failed
1 files changed, 14 insertions(+), 12 deletions(-)

M meteo_scraper/task.py
M meteo_scraper/task.py +14 -12
@@ 54,12 54,13 @@ def scrap_ecmwf_hres(task):
             inputdata={'filename': filename}
         )
         t.join()
-        t = api.schedule(
-            task.engine,
-            'ingest_ecmwf_hres',
-            domain='meteo',
-            inputdata={'filename': filename}
-        )
+        if t.status == 'done':
+            t = api.schedule(
+                task.engine,
+                'ingest_ecmwf_hres',
+                domain='meteo',
+                inputdata={'filename': filename}
+            )
 
 
 @task(

          
@@ 102,9 103,10 @@ def scrap_ecmwf_ens(task):
             inputdata={'filename': filename}
         )
         t.join()
-        t = api.schedule(
-            task.engine,
-            'ingest_ecmwf_ens',
-            domain='meteo',
-            inputdata={'filename': filename}
-        )
+        if t.status == 'done':
+            t = api.schedule(
+                task.engine,
+                'ingest_ecmwf_ens',
+                domain='meteo',
+                inputdata={'filename': filename}
+            )