daemon: configurable LLM concurrency
New config field "llm_concurrency" (default 1) controls how many concurrent model calls the daemon runs. Worker pool scales to match.
This commit is contained in:
parent
1f9249a767
commit
a9b0438c74
2 changed files with 11 additions and 6 deletions
|
|
@ -283,14 +283,13 @@ struct DaemonStatus {
|
|||
|
||||
pub fn run_daemon() -> Result<(), String> {
|
||||
let choir = Choir::new();
|
||||
// Workers: 2 for long-running loops (scheduler, session-watcher),
|
||||
// plus 1 for the actual LLM job (pool capacity is 1).
|
||||
// Non-LLM jobs (decay, health) also need a worker, so 4 total.
|
||||
let names: Vec<String> = (0..4).map(|i| format!("w{}", i)).collect();
|
||||
let llm_concurrency = crate::config::get().llm_concurrency;
|
||||
// Workers: 2 for long-running loops + llm_concurrency + 1 for non-LLM jobs
|
||||
let n_workers = llm_concurrency + 3;
|
||||
let names: Vec<String> = (0..n_workers).map(|i| format!("w{}", i)).collect();
|
||||
let _workers: Vec<_> = names.iter().map(|n| choir.add_worker(n)).collect();
|
||||
|
||||
// LLM API: 1 concurrent call to control token burn rate
|
||||
let llm = ResourcePool::new("llm", 1);
|
||||
let llm = ResourcePool::new("llm", llm_concurrency);
|
||||
llm.bind(&choir);
|
||||
|
||||
// Recover last_daily from previous status file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue