Skip to content

Commit 5a7cad1

Browse files
committed
style: rustfmt
1 parent d922264 commit 5a7cad1

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

src/executor.rs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,15 @@ async fn run_batch(
240240
data: serde_json::json!({ "task_id": task_id }),
241241
});
242242

243-
let result =
244-
run_single_task(&config, &task, &agent_code, &agent_language, &agent_env, cancel_rx).await;
243+
let result = run_single_task(
244+
&config,
245+
&task,
246+
&agent_code,
247+
&agent_language,
248+
&agent_env,
249+
cancel_rx,
250+
)
251+
.await;
245252

246253
let _ = events_tx.send(crate::session::WsEvent {
247254
event: "task_complete".to_string(),
@@ -561,16 +568,26 @@ async fn run_agent(
561568
argv_owned.push(prompt.into());
562569
}
563570
let argv: Vec<&str> = argv_owned.iter().map(|s| s.as_str()).collect();
564-
info!("Running agent: {:?} with {} env vars", argv, agent_env.len());
571+
info!(
572+
"Running agent: {:?} with {} env vars",
573+
argv,
574+
agent_env.len()
575+
);
565576

566577
let mut all_env: Vec<(String, String)> = vec![
567-
("TASK_PROMPT".into(), prompt_path.to_string_lossy().to_string()),
578+
(
579+
"TASK_PROMPT".into(),
580+
prompt_path.to_string_lossy().to_string(),
581+
),
568582
("REPO_DIR".into(), repo_dir.to_string_lossy().to_string()),
569583
];
570584
for (k, v) in agent_env {
571585
all_env.push((k.clone(), v.clone()));
572586
}
573-
let env_refs: Vec<(&str, &str)> = all_env.iter().map(|(k, v)| (k.as_str(), v.as_str())).collect();
587+
let env_refs: Vec<(&str, &str)> = all_env
588+
.iter()
589+
.map(|(k, v)| (k.as_str(), v.as_str()))
590+
.collect();
574591

575592
let (stdout, stderr, exit) = run_cmd(
576593
&argv,

src/handlers.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,9 @@ async fn submit_tasks(
12331233
let concurrent = state.config.max_concurrent_tasks;
12341234

12351235
let env = state.agent_env.read().await.clone();
1236-
state.executor.spawn_batch(batch, final_archive, concurrent, env);
1236+
state
1237+
.executor
1238+
.spawn_batch(batch, final_archive, concurrent, env);
12371239

12381240
Ok((
12391241
StatusCode::ACCEPTED,
@@ -1405,7 +1407,9 @@ async fn evaluate_with_stored_agent(
14051407
let concurrent = state.config.max_concurrent_tasks;
14061408

14071409
let env = state.agent_env.read().await.clone();
1408-
state.executor.spawn_batch(batch, final_archive, concurrent, env);
1410+
state
1411+
.executor
1412+
.spawn_batch(batch, final_archive, concurrent, env);
14091413

14101414
Ok((
14111415
StatusCode::ACCEPTED,

0 commit comments

Comments
 (0)