Skip to main content

Module extraction_queue

Module extraction_queue 

Source
Expand description

Background extraction queue with bounded concurrency. Bounded extraction queue with backpressure and graceful shutdown.

Instead of fire-and-forget tokio::spawn per extraction request, this module provides a bounded channel + worker pool. Benefits:

  • Backpressure: at most QUEUE_CAPACITY pending extractions
  • Bounded concurrency: MAX_CONCURRENT parallel LLM calls
  • Graceful drain: on shutdown, the worker finishes in-flight work

Structs§

ExtractionRequest
What we send into the queue.

Functions§

spawn_worker
Spawn the extraction worker. Returns the sender half and a join handle that resolves when all in-flight work is drained.

Type Aliases§

ExtractionSender