fix(worker): update stac_client for pystac-client 0.9.0 compatibility
Build and Push Docker Images / build-and-push (push) Has been cancelled Details

This commit is contained in:
fchinembiri 2026-05-01 12:47:34 +02:00
parent f97bd14a7f
commit 9b9bd2da5e
1 changed files with 2 additions and 6 deletions

View File

@ -100,16 +100,12 @@ class DEASTACClient:
for attempt in range(max_retries): for attempt in range(max_retries):
try: try:
return operation(*args, **kwargs) return operation(*args, **kwargs)
except ( except Exception as e:
pystac_exc.PySTACClientError,
pystac_exc.PySTACIOError,
Exception,
) as e:
# Only retry on network-like errors # Only retry on network-like errors
error_str = str(e).lower() error_str = str(e).lower()
should_retry = any( should_retry = any(
kw in error_str kw in error_str
for kw in ["connection", "timeout", "network", "temporal"] for kw in ["connection", "timeout", "network", "temporal", "retry", "503", "504"]
) )
if not should_retry: if not should_retry:
raise raise