Fix: Use download_with_sanity_check() and fail container on download failure
This commit is contained in:
+5
-5
@@ -62,14 +62,14 @@ async def run_initial_download():
|
||||
logger.info(f"MTGJSON data already exists (last refresh: {last_refresh})")
|
||||
return
|
||||
|
||||
logger.info("Running initial MTGJSON data download...")
|
||||
logger.info("Running initial MTGJSON data download with sanity checks...")
|
||||
logger.info("This may take several minutes depending on network speed...")
|
||||
|
||||
# Download files
|
||||
success = await manager.download_files()
|
||||
# Download files with sanity checking and retry logic
|
||||
success = await manager.download_with_sanity_check()
|
||||
if not success:
|
||||
logger.error("Failed to download MTGJSON files")
|
||||
return
|
||||
logger.error("Failed to download MTGJSON files after retries - marking container unhealthy")
|
||||
raise RuntimeError("MTGJSON data download failed after all retry attempts")
|
||||
|
||||
# Unpack files
|
||||
await manager.unpack_files()
|
||||
|
||||
Reference in New Issue
Block a user