From 383572066ea2fe718064b6509545ad64747c51f1 Mon Sep 17 00:00:00 2001 From: devsjc <47188100+devsjc@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:47:17 +0100 Subject: [PATCH] fix(sat-etl): Fix removal of downloaded scans --- containers/sat/download_process_sat.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/containers/sat/download_process_sat.py b/containers/sat/download_process_sat.py index f3c3191..19da70f 100644 --- a/containers/sat/download_process_sat.py +++ b/containers/sat/download_process_sat.py @@ -627,15 +627,14 @@ def run(args: argparse.Namespace) -> None: if len(scan_times) > cpu_count(): log.debug(f"Concurrency: {cpu_count()}") pool = Pool(max(cpu_count(), 10)) # EUMDAC only allows for 10 concurrent requests - raw_paths = pool.starmap( + results: list[list[pathlib.Path]] = pool.starmap( download_scans, [(sat_config, folder, scan_time, token) for scan_time in scan_times], ) pool.close() pool.join() - raw_paths = list(itertools.chain(raw_paths)) + raw_paths.extend(list(itertools.chain(*results))) else: - raw_paths = [] for scan_time in scan_times: result: list[pathlib.Path] = download_scans(sat_config, folder, scan_time, token) if len(result) > 0: