mirror of
https://github.com/nethunterzist/trendyol-analiz
synced 2026-08-29 21:38:00 +00:00
fix(ciromarket): sosyal kanit asamasinda queue progress guncelle
Ne yaptik: - _enrich_report_task fonksiyonu progress_cb parametresi aldi - social_proof calismasi sirasinda daemon monitor thread baslatiyor - Her 30 saniyede enrichment_progress izleyip queue'yu 96-99% araliginda guncelliyor - queue_worker.py: _progress_cb lambda ile self._update_progress bagladi Neden yaptik: - Sosyal kanit asamasi (5000+ urun, ~12 dk) boyunca progress yuzde 95'te donuyordu, kullanici rapor takildi saniyordu. - Artik UI gercek ilerlemeyi 96-99% araliginda gosterecek.
This commit is contained in:
@@ -308,7 +308,11 @@ class QueueWorker:
|
||||
self._update_progress(db, queue_id, 95, "Sosyal kanit verileri toplanıyor...")
|
||||
try:
|
||||
from main import _enrich_report_task
|
||||
_enrich_report_task(report_id)
|
||||
|
||||
def _progress_cb(p: int, m: str):
|
||||
self._update_progress(db, queue_id, p, m)
|
||||
|
||||
_enrich_report_task(report_id, progress_cb=_progress_cb)
|
||||
log.info(f"Enrichment completed for report {report_id}")
|
||||
except Exception as e:
|
||||
log.warning(f"Enrichment failed (non-critical): {e}")
|
||||
|
||||
Reference in New Issue
Block a user