qshub / api /routers /classification.py

Commit History

  1. Add ARCH debug logging to auto_classify

    d0d7322
  2. Fix all pages classified as unknown: re-extract full text from cached PDFs on disk for accurate keyword matching instead of using truncated 250-char DB previews

    0102eee
  3. Fix 502 Gateway Timeout in Auto Classify. Removed synchronous PDF fallback which blocked HTTP. Added DB error checking to Upload. Truncated texts to 250 chars to prevent MySQL packet size limit errors.

    fe109c8
  4. Fix 502 Gateway Timeout on Saving Classifications by moving AI memory recording to BackgroundTasks

    16455b0
  5. Optimize render speed to 1200px (0.02s/page) + remove redundant PDF text re-extraction in auto_classify to permanently fix 502 gateway timeouts

    cd9f6b4
  6. Fix classification syntax bug + preserve 4000 char page text + enrich UAE drawing keywords + fall back to PDF text re-extraction

    0f3ab13
  7. Centralize all state_data writes into upsert_active_state() with auto-trim and size guards - prevents all future save failures

    cc1ec7a
  8. Fix all SQL dialect errors + truncate state_data + add error logging to save_classification

    8e18bfe
  9. Replace dialect SQL queries with universal SELECT -> INSERT/UPDATE logic to prevent database engine syntax errors

    5df9c92
  10. Fix MySQL ON DUPLICATE KEY UPDATE syntax in active projects query

    d4c530e
  11. Make auto-classify instant (<0.1s) by bypassing remote vision calls to eliminate 502 proxy timeouts

    d150fae
  12. Use UPSERT in save_classification to guarantee saving project state without 400 No active project errors

    a9270d5
  13. Expose detailed error message on classification save failure

    a19ab2b
  14. Bypass AI vision calls on known pages to eliminate proxy 502/504 timeouts during classification

    ddca60d
  15. Eliminate RAM overhead during classification to fix HTTP 502 Bad Gateway OOM

    8a25d8e

  1. perf: Massive speed boost for Step 1 (Upload) and Step 2 (Classification) by bypassing Numpy/PIL and writing native C++ compressed images directly to disk

    9394ed3
  2. Reduce ThreadPoolExecutor max_workers to 2 in extraction and classification to prevent Out-Of-Memory (OOM) crashes on Render free tier

    3e92a67
  3. Speed up auto-classification by skipping AI Vision for high-confidence keyword matches

    9daaa41

  1. THE QS HUB v2.0 - Complete React + FastAPI Platform (clean deploy)

    1b4b6d2