daemon: add run-agent RPC for queuing agent jobs
Adds `poc-memory daemon run-agent <type> <count>` CLI command that sends an RPC to the daemon to queue agent runs, instead of spawning separate processes. Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
a505b9384e
commit
7d6ebbacab
2 changed files with 16 additions and 0 deletions
|
|
@ -2423,6 +2423,11 @@ fn cmd_daemon(sub: Option<&str>, args: &[String]) -> Result<(), String> {
|
|||
}
|
||||
Some("install") => daemon::install_service(),
|
||||
Some("consolidate") => daemon::rpc_consolidate(),
|
||||
Some("run-agent") | Some("run") => {
|
||||
let agent = args.first().map(|s| s.as_str()).unwrap_or("replay");
|
||||
let count: usize = args.get(1).and_then(|s| s.parse().ok()).unwrap_or(1);
|
||||
daemon::rpc_run_agent(agent, count)
|
||||
}
|
||||
Some("tui") => tui::run_tui(),
|
||||
Some(other) => Err(format!("unknown daemon subcommand: {}", other)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue