use new proxmox-async crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -59,7 +59,7 @@ async fn run() -> Result<(), Error> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if let Err(err) = pbs_runtime::main(run()) {
|
||||
if let Err(err) = proxmox_async::runtime::main(run()) {
|
||||
eprintln!("ERROR: {}", err);
|
||||
}
|
||||
println!("DONE");
|
||||
|
@ -69,7 +69,7 @@ fn send_request(
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
pbs_runtime::main(run())
|
||||
proxmox_async::runtime::main(run())
|
||||
}
|
||||
|
||||
async fn run() -> Result<(), Error> {
|
||||
|
@ -69,7 +69,7 @@ fn send_request(
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
pbs_runtime::main(run())
|
||||
proxmox_async::runtime::main(run())
|
||||
}
|
||||
|
||||
async fn run() -> Result<(), Error> {
|
||||
|
@ -9,7 +9,7 @@ use tokio::net::{TcpListener, TcpStream};
|
||||
use pbs_buildcfg::configdir;
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
pbs_runtime::main(run())
|
||||
proxmox_async::runtime::main(run())
|
||||
}
|
||||
|
||||
async fn run() -> Result<(), Error> {
|
||||
|
@ -5,7 +5,7 @@ use hyper::{Body, Request, Response};
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
pbs_runtime::main(run())
|
||||
proxmox_async::runtime::main(run())
|
||||
}
|
||||
|
||||
async fn run() -> Result<(), Error> {
|
||||
|
@ -13,7 +13,7 @@ use pbs_client::ChunkStream;
|
||||
// Note: I can currently get about 830MB/s
|
||||
|
||||
fn main() {
|
||||
if let Err(err) = pbs_runtime::main(run()) {
|
||||
if let Err(err) = proxmox_async::runtime::main(run()) {
|
||||
panic!("ERROR: {}", err);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ async fn upload_speed() -> Result<f64, Error> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match pbs_runtime::main(upload_speed()) {
|
||||
match proxmox_async::runtime::main(upload_speed()) {
|
||||
Ok(mbs) => {
|
||||
println!("average upload speed: {} MB/s", mbs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user