mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-24 07:38:13 +02:00
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:
1 parent
7f6e97d2ba
commit
6cf7f98843
578 files changed
+94964
-87
No files matched your search
@@ -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]
|
||||
|
||||
|
||||
Reference in new issue
Block a user