diff --git a/make_post_sell/lib/karaoke.py b/make_post_sell/lib/karaoke.py index 80f36e6..48702de 100644 --- a/make_post_sell/lib/karaoke.py +++ b/make_post_sell/lib/karaoke.py @@ -232,7 +232,11 @@ def backfill_karaoke_async(shop_id, session_factory, app_settings): ) if sizes: return product_id, title, file_key, ext, media_type, sizes - except Exception: + except Exception as exc: + # Don't retry if the source file doesn't exist in S3 + if "NoSuchKey" in str(type(exc).__name__) or "NoSuchKey" in str(exc): + log.warning(" SKIP %s (%s) — source file not in S3", title, file_key) + return product_id, title, file_key, ext, media_type, None log.exception("Backfill attempt %d failed for %s", attempt + 1, title) if attempt < MAX_RETRIES - 1: