diff --git a/backend/app/main.py b/backend/app/main.py index cbaaa91..ec96299 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -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()