Worker: separate quick lane for summaries and answers
Summaries and questions get their own slots (QUICK_CONCURRENCY, default 2), so they never wait behind detailed analyses (ANALYSIS_CONCURRENCY, default 4). A free slow slot also takes quick work; a lane of size 0 is off, so the lanes can run as separate deployments. Documented that several workers can share the queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -24,8 +24,10 @@ pub struct Config {
|
||||
pub openrouter_base_url: String,
|
||||
/// Frontend address, sent to OpenRouter as `HTTP-Referer`.
|
||||
pub public_base_url: Option<String>,
|
||||
/// Analyses written at the same time.
|
||||
/// Detailed analyses and forecasts written at the same time (0: none).
|
||||
pub analysis_concurrency: usize,
|
||||
/// Summaries and answers written at the same time (0: none).
|
||||
pub quick_concurrency: usize,
|
||||
/// After this many failed attempts an analysis fails and is refunded.
|
||||
pub max_analysis_attempts: i32,
|
||||
}
|
||||
@@ -67,6 +69,7 @@ impl Config {
|
||||
.unwrap_or_else(|| crate::analysis::openrouter::DEFAULT_BASE_URL.into()),
|
||||
public_base_url: var("PUBLIC_BASE_URL"),
|
||||
analysis_concurrency: parsed("ANALYSIS_CONCURRENCY", 4)?,
|
||||
quick_concurrency: parsed("QUICK_CONCURRENCY", 2)?,
|
||||
max_analysis_attempts: parsed("MAX_ANALYSIS_ATTEMPTS", 3)?,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user