Quellcode durchsuchen

cache generation should not block startup

tuanchris vor 4 Monaten
Ursprung
Commit
98c8011877
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      VERSION
  2. 1 1
      main.py

+ 1 - 1
VERSION

@@ -1 +1 @@
-3.2.1
+3.2.2

+ 1 - 1
main.py

@@ -105,7 +105,7 @@ async def lifespan(app: FastAPI):
             
             if await is_cache_generation_needed_async():
                 logger.info("Cache generation needed, starting background task...")
-                await generate_cache_background()  # Use await to ensure it completes
+                asyncio.create_task(generate_cache_background())  # Don't await - run in background
             else:
                 logger.info("Cache is up to date, skipping generation")
         except Exception as e: