Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Dec 23, 2024
1 parent 4d6776b commit c6e4586
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/numerical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub async fn collect_data(
}
};

vec![PublishableMessage{ topic: TOPIC, data: vec![value], unit: UNIT }]
vec![PublishableMessage{ topic: TOPIC, data: vec![value.unwrap()], unit: UNIT }]

}
_ = cpu_usage_int.tick() => {
Expand Down Expand Up @@ -96,7 +96,7 @@ pub async fn collect_data(
const TOPIC: &str = "TPU/OnBoard/MemAvailable";
const UNIT: &str = "MB";

sys.refresh_memory_specifics(MemoryRefreshKind::new().with_ram());
sys.refresh_memory_specifics(MemoryRefreshKind::nothing().with_ram());

vec![PublishableMessage { topic: TOPIC, data: vec![sys.free_memory() as f32 / 1e6], unit: UNIT}]
}
Expand Down
11 changes: 7 additions & 4 deletions uploader/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ struct UploaderArgs {
}

/// Logger module: upload a data_dump.log file to scylla
fn logger_upload<'a>(
fn logger_upload(
filepath: &Path,
scylla_uri: &'a str,
scylla_uri: &str,
client: &reqwest::blocking::Client,
) -> Result<(), reqwest::Error> {
let res = client
Expand All @@ -36,7 +36,7 @@ fn logger_upload<'a>(

res.error_for_status()?;

return Ok(());
Ok(())
}

fn main() {
Expand Down Expand Up @@ -90,5 +90,8 @@ fn main() {
}
}

println!("Done, feel free to clear the inside of the {} directory!", cli.output_folder);
println!(
"Done, feel free to clear the inside of the {} directory!",
cli.output_folder
);
}

0 comments on commit c6e4586

Please sign in to comment.