Commit Graph

3 Commits

Author SHA1 Message Date
a236187f3a feat: MercadoLibre integration + inventory bulk publish + WhatsApp bridge fixes
- Add MercadoLibre OAuth, listings, orders, webhooks and category search
- New marketplace_external_bp.py, meli_service.py, marketplace_external_service.py
- New marketplace_external.html/js with ML management UI
- Inventory: bulk publish to ML with category autocomplete, listing type and shipping selectors
- Inventory: new .btn--meli styles, select/label CSS fixes
- WhatsApp bridge: rate limiting, 440/515/408 error handling, stale watchdog
- DB migration v3.4_meli_integration.sql for marketplace_listings, orders, sync_queue
- Add Celery tasks for ML sync and webhook processing
- Sidebar: MercadoLibre navigation link
2026-05-26 04:24:07 +00:00
e21722a3a9 FASE 7c: Redis Cache + Gthread Workers
Cambios implementados:

1. Redis cache para _classify_cache (catalog_service.py):
   - Reemplaza dict in-memory por Redis compartido entre workers
   - TTL 5 minutos para clasificación Nexpart
   - classify_cache_clear() y classify_cache_stats() actualizados
   - Hit rate pasa de ~6% (15 cachés separados) a ~80%+ (cache unificado)

2. Redis cache para vehicle info en smart_search():
   - Verifica Redis antes de ejecutar DISTINCT ON + 4 JOINs sobre 2B filas
   - Cache miss: query solo para los part_ids faltantes
   - TTL 1 hora por part_id
   - Impacto: búsquedas repetidas pasan de 500ms–2s a < 50ms

3. Gunicorn gthread (gunicorn.conf.py):
   - worker_class = 'gthread' con 4 threads por worker
   - 4 workers × 4 threads = 16 requests concurrentes
   - max_requests = 1000 para reciclar workers y prevenir memory leaks

Tests: 73/73 pasando
2026-04-27 08:28:03 +00:00
e00dce7d5a feat(pos): add gunicorn, marketplace B2B, and subscription billing (#7, #8, #12)
- Gunicorn production server with auto-scaled workers, run.sh, updated systemd service
- Marketplace B2B: cross-tenant inventory search, ordering, seller management with full UI
- Subscription billing: plan limits enforced on products/employees/branches, billing API + upgrade flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:17:33 +00:00