Skip to content

Commit

Permalink
Agent 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dynco-nym committed Oct 30, 2024
1 parent 6ddfc32 commit 07cb942
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nym-node-status-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "nym-node-status-agent"
version = "0.1.3"
version = "0.1.4"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
Expand Down
11 changes: 3 additions & 8 deletions nym-node-status-agent/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,19 @@ pub(crate) enum Command {
/// path of binary to run
#[arg(long, env = "NODE_STATUS_AGENT_PROBE_PATH")]
probe_path: String,
#[arg(short, long, env = "NODE_STATUS_AGENT_GATEWAY_ID")]
gateway_id: Option<String>,
},
}

impl Args {
pub(crate) async fn execute(&self) -> anyhow::Result<()> {
match &self.command {
Command::RunProbe {
probe_path,
gateway_id,
} => self.run_probe(probe_path, gateway_id).await?,
Command::RunProbe { probe_path } => self.run_probe(probe_path).await?,
}

Ok(())
}

async fn run_probe(&self, probe_path: &str, gateway_id: &Option<String>) -> anyhow::Result<()> {
async fn run_probe(&self, probe_path: &str) -> anyhow::Result<()> {
let server_address = format!("{}:{}", &self.server_address, self.server_port);

let probe = GwProbe::new(probe_path.to_string());
Expand All @@ -58,7 +53,7 @@ impl Args {

let testrun = request_testrun(&server_address).await?;

let log = probe.run_and_get_log(gateway_id);
let log = probe.run_and_get_log(&Some(testrun.gateway_identity_key));

submit_results(&server_address, testrun.testrun_id, log).await?;

Expand Down

0 comments on commit 07cb942

Please sign in to comment.