Upload directory to enclave #4
@ -28,7 +28,7 @@ pub fn handle_app(app_matche: &ArgMatches) {
|
||||
Some(("delete", subcom_args)) => cli_print(handle_delete(subcom_args)),
|
||||
Some(("list", subcom_args)) => cli_print(handle_list(subcom_args)),
|
||||
Some(("config", subcom_args)) => handle_config(subcom_args),
|
||||
_ => println!("No valid subcommand provided. Use --help for more information."),
|
||||
_ => eprintln!("No valid subcommand provided. Use --help for more information."),
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ pub fn handle_app_nodes(matches: &ArgMatches) {
|
||||
todo!()
|
||||
}
|
||||
_ => {
|
||||
println!("Available commands are search, inspec and report. Use --help for more information.")
|
||||
eprintln!("Available commands are search, inspec and report. Use --help for more information.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -202,7 +202,7 @@ fn handle_config(matches: &ArgMatches) {
|
||||
Some(("update", subcom_args)) => cli_print(handle_config_sub_update(subcom_args)),
|
||||
Some(("get", subcom_args)) => cli_print(handle_config_sub_get(subcom_args)),
|
||||
_ => {
|
||||
println!("No valid config subcommand provided.");
|
||||
eprintln!("No valid config subcommand provided.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ pub async fn list_contracts(req: ListAppContractsReq) -> Result<Vec<AppContract>
|
||||
app_contracts.push(contract);
|
||||
}
|
||||
Err(e) => {
|
||||
println!("Brain disconnected from register_node: {e}");
|
||||
eprintln!("Brain disconnected from register_node: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,8 +74,7 @@ pub fn calculate_nanolp_for_app(
|
||||
let total_units =
|
||||
(vcpus as f64 * 5f64) + (memory_mb as f64 / 200f64) + (disk_size_mb as f64 / 10000f64);
|
||||
let locked_nano = (hours as f64 * 60f64 * total_units * node_price as f64) as u64;
|
||||
// TODO: change all println to eprintln
|
||||
println!(
|
||||
eprintln!(
|
||||
"Node price: {}/unit/minute. Total Units for hardware requested: {:.4}. Locking {} LP (offering the App for {} hours).",
|
||||
node_price as f64 / 1_000_000_000.0,
|
||||
total_units,
|
||||
@ -127,7 +126,7 @@ pub async fn deploy_new_app_and_update_config(
|
||||
|
||||
if new_app_res.error.is_empty() {
|
||||
if let Some(launch_config) = launch_config {
|
||||
println!("Deploying...");
|
||||
eprintln!("Deploying...");
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(2500)).await;
|
||||
Retry::spawn(FixedInterval::from_millis(1000).take(10), || {
|
||||
log::debug!("retrying attestation and launch config update");
|
||||
|
Loading…
Reference in New Issue
Block a user