feat: Optimisation performance (Async DB) et Ajout Rapport Analyse

- Passage des requêtes DB en asynchrone dans improved_search_service pour éviter le blocage de l'Event Loop.
- Ajout du Rapport d'Analyse Technique complet.
- Sécurisation CORS (best effort).
- Ajout Walkthrough et Implementation Plan.
This commit is contained in:
Michael committed 2026-01-07 19:43:42 +01:00
1 parent 7f6e97d2ba
commit 6cf7f98843
578 files changed
+94964 -87

No files matched your search

+9 -1
View File
@@ -800,7 +800,15 @@ async def search_products(
Yields SearchProgress events incrementally.
"""
# 1. Get sites to search
sites = db.query(SearchSite).order_by(SearchSite.priority).all()
# 1. Get sites to search (Async DB Call)
from fastapi.concurrency import run_in_threadpool
def get_sites_sync():
sites = db.query(SearchSite).order_by(SearchSite.priority).all()
return sites
sites = await run_in_threadpool(get_sites_sync)
if site_ids:
sites = [s for s in sites if s.id in site_ids]