Skip to content

Commit

Permalink
chore: update relay and influxdb-inlet output to be consistent with t…
Browse files Browse the repository at this point in the history
…he tcp-inlet
  • Loading branch information
adrianbenavides committed Jan 6, 2025
1 parent 7225929 commit 59e69c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,29 @@ impl Command for InfluxDBCreateCommand {
.add_inlet_created_event(&opts, &node_name, &inlet_status)
.await?;

let created_message = fmt_ok!(
"Created a new InfluxDB Inlet in the Node {} bound to {}\n",
let created_message = format!(
"Created a new InfluxDB Inlet in the Node {} bound to {}",
color_primary(&node_name),
color_primary(&self.tcp_inlet.from)
color_primary(self.tcp_inlet.from.to_string()),
);

let plain = if self.tcp_inlet.no_connection_wait {
created_message + &fmt_log!("It will automatically connect to the TCP Outlet at {} as soon as it is available",
fmt_ok!("{created_message}\n")
+ &fmt_log!("It will automatically connect to the InfluxDB Outlet at {} as soon as it is available\n",
color_primary(&self.tcp_inlet.to)
)
} else if inlet_status.status == ConnectionStatus::Up {
created_message
fmt_ok!("{created_message}\n")
+ &fmt_log!(
"sending traffic to the TCP Outlet at {}",
"sending traffic to the TCP Outlet at {}\n",
color_primary(&self.tcp_inlet.to)
)
} else {
fmt_warn!(
"A InfluxDB Inlet was created in the Node {} bound to {} but failed to connect to the TCP Outlet at {}\n",
color_primary(&node_name),
color_primary(self.tcp_inlet.from.to_string()),
fmt_warn!("{created_message}\n")
+ &fmt_log!(
"but failed to connect to the TCP Outlet at {}\n",
color_primary(&self.tcp_inlet.to)
) + &fmt_info!("It will retry to connect automatically")
) + &fmt_info!("It will automatically connect to the InfluxDB Outlet as soon as it is available\n")
};

opts.terminal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl Command for CreateCommand {
let at = color_primary(&at);
let node = color_primary(format!("/node/{}", &node.node_name()));
fmt_warn!("A relay was created at {node} but failed to connect to {at}\n")
+ &fmt_info!("It will retry to connect automatically")
+ &fmt_info!("It will automatically connect to the Relay as soon as it is available")
};
opts.terminal
.stdout()
Expand Down

0 comments on commit 59e69c2

Please sign in to comment.