Skip to content

Commit

Permalink
fix(sat-etl): Reduce EUMDAC throttling messages
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Sep 17, 2024
1 parent ba8b310 commit 97621e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions containers/sat/download_process_sat.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
for logger in [
"cfgrib",
"charset_normalizer",
"eumdac",
"eumdac", # If you want to know about throttling, set this to WARNING
"native_msg",
"pyorbital",
"pyresample",
"requests",
"satpy",
"urllib3",
]:
logging.getLogger(logger).setLevel(logging.WARNING)
logging.getLogger(logger).setLevel(logging.ERROR)

log = logging.getLogger("sat-etl")

Expand Down Expand Up @@ -197,13 +197,15 @@ def download_scans(
log.error(f"Error finding products: {e}")
return []

log.debug(f"Found {len(products)} products for {scan_time}")
if len(products) == 0:
log.warning(f"No products found for {scan_time}.")

for product in products:
for entry in list(filter(lambda p: p.endswith(".nat"), product.entries)):
filepath: pathlib.Path = folder / entry
# Prevent downloading existing files
if filepath.exists():
log.debug("Skipping existing file: {filepath}")
files.append(filepath)
continue
# Try download a few times
Expand Down

0 comments on commit 97621e1

Please sign in to comment.