Files
Scriberr/internal/queue
scnerd 8d05a7cdd9 fix(queue): allow QUEUE_WORKERS env var to override hardcoded worker count
The QUEUE_WORKERS environment variable was defined and read in
getOptimalWorkerCount(), but NewTaskQueue() unconditionally overwrote
the result with the hardcoded legacyWorkers parameter (always 2).
This made QUEUE_WORKERS effectively dead code.

Now legacyWorkers is only used as a fallback when QUEUE_WORKERS is
not set, preserving the default of 2 workers while allowing users
to control concurrency via the environment variable.

Set QUEUE_WORKERS=1 to serialize all transcription jobs and prevent
system overload during bulk uploads.

Fixes: rishikanthc/Scriberr#379

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 10:38:09 -07:00
..