Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
Signed-off-by: ESPIE <[email protected]>
  • Loading branch information
remi-espie committed May 2, 2024
1 parent f91d524 commit dd8822b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
19 changes: 14 additions & 5 deletions src/agent/src/agents/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::{workload, AgentError, AgentResult};
use rand::distributions::{Alphanumeric, DistString};
use serde::Deserialize;
use std::collections::HashSet;
use std::fs::create_dir_all;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use std::{fs::create_dir_all};
use tokio::process::Command;
use tokio::sync::Mutex;

Expand Down Expand Up @@ -42,7 +42,10 @@ impl RustAgent {

child_processes.lock().await.insert(child.id().unwrap());

let output = child.wait_with_output().await.expect("Failed to wait on child");
let output = child
.wait_with_output()
.await
.expect("Failed to wait on child");

Ok(AgentOutput {
exit_code: output.status.code().unwrap(),
Expand All @@ -55,8 +58,11 @@ impl RustAgent {
.current_dir(function_dir)
.spawn()
.expect("Failed to build function");

let output = child.wait_with_output().await.expect("Failed to wait on child");

let output = child
.wait_with_output()
.await
.expect("Failed to wait on child");

Ok(AgentOutput {
exit_code: output.status.code().unwrap(),
Expand Down Expand Up @@ -163,7 +169,10 @@ impl Agent for RustAgent {

child_processes.lock().await.insert(child.id().unwrap());

let output = child.wait_with_output().await.expect("Failed to wait on child");
let output = child
.wait_with_output()
.await
.expect("Failed to wait on child");

let agent_output = AgentOutput {
exit_code: output.status.code().unwrap(),
Expand Down
5 changes: 4 additions & 1 deletion src/agent/src/workload/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ impl WorkloadRunner for WorkloadRunnerService {
nix::sys::signal::Signal::SIGTERM,
) {
Ok(_) => println!("Sent SIGTERM to child process {}", child_id),
Err(e) => println!("Failed to send SIGTERM to child process {}: {}", child_id, e),
Err(e) => println!(
"Failed to send SIGTERM to child process {}: {}",
child_id, e
),
}
}

Expand Down

0 comments on commit dd8822b

Please sign in to comment.