feat(gateway): implement separate Piscina pools for text and media analysis to optimize processing

This commit is contained in:
asepharyana
2026-08-31 22:59:27 +07:00
parent 3ce594d9b5
commit 12cc956329
9 changed files with 272 additions and 65 deletions
+4 -1
View File
@@ -134,4 +134,7 @@ RETENTION_DRY_RUN=true # Dry-run: log but do not delete (defaul
AUTO_MIGRATE_ON_STARTUP=true # Run database migrations on startup (default: true)
# === Worker Pool ===
# PISCINA_MAX_THREADS=4 # Worker thread pool size (optional, defaults to CPU cores)
# Text and media AI-analysis batches run on separate Piscina pools so a slow
# image/vision batch can never queue-block fast text-only batches.
# PISCINA_MAX_THREADS=4 # Text-analysis worker pool size (optional, defaults to CPU cores)
# PISCINA_MEDIA_MAX_THREADS=2 # Media-analysis worker pool size (optional, default 2)