use new proxmox-async crate
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -29,6 +29,7 @@ xdg = "2.2"
|
||||
|
||||
pathpatterns = "0.1.2"
|
||||
proxmox = "0.15.3"
|
||||
proxmox-async = "0.1"
|
||||
proxmox-fuse = "0.1.1"
|
||||
proxmox-http = { version = "0.5.4", features = [ "client", "http-helpers", "websocket" ] }
|
||||
proxmox-io = { version = "1", features = [ "tokio" ] }
|
||||
@ -41,5 +42,4 @@ pxar = { version = "0.10.1", features = [ "tokio-io" ] }
|
||||
pbs-api-types = { path = "../pbs-api-types" }
|
||||
pbs-buildcfg = { path = "../pbs-buildcfg" }
|
||||
pbs-datastore = { path = "../pbs-datastore" }
|
||||
pbs-runtime = { path = "../pbs-runtime" }
|
||||
pbs-tools = { path = "../pbs-tools" }
|
||||
|
@ -19,7 +19,7 @@ use proxmox_router::cli::{self, CliCommand, CliCommandMap, CliHelper, CommandLin
|
||||
use proxmox_schema::api;
|
||||
use pxar::{EntryKind, Metadata};
|
||||
|
||||
use pbs_runtime::block_in_place;
|
||||
use proxmox_async::runtime::block_in_place;
|
||||
use pbs_datastore::catalog::{self, DirEntryAttribute};
|
||||
|
||||
use crate::pxar::Flags;
|
||||
|
@ -22,9 +22,9 @@ use proxmox_router::HttpError;
|
||||
|
||||
use proxmox_http::client::{HttpsConnector, RateLimiter};
|
||||
use proxmox_http::uri::build_authority;
|
||||
use proxmox_async::broadcast_future::BroadcastFuture;
|
||||
|
||||
use pbs_api_types::{Authid, Userid};
|
||||
use pbs_tools::broadcast_future::BroadcastFuture;
|
||||
use pbs_tools::json::json_object_to_query;
|
||||
use pbs_tools::ticket;
|
||||
use pbs_tools::percent_encoding::DEFAULT_ENCODE_SET;
|
||||
|
@ -25,7 +25,7 @@ use proxmox::c_result;
|
||||
use proxmox::tools::fs::{create_path, CreateOptions};
|
||||
use proxmox_io::{sparse_copy, sparse_copy_async};
|
||||
|
||||
use pbs_tools::zip::{ZipEncoder, ZipEntry};
|
||||
use proxmox_async::zip::{ZipEncoder, ZipEntry};
|
||||
|
||||
use crate::pxar::dir_stack::PxarDirStack;
|
||||
use crate::pxar::metadata;
|
||||
|
@ -12,9 +12,10 @@ use nix::dir::Dir;
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::stat::Mode;
|
||||
|
||||
use proxmox_async::tokio_writer_adapter::TokioWriterAdapter;
|
||||
|
||||
use pbs_datastore::catalog::CatalogWriter;
|
||||
use pbs_tools::sync::StdChannelWriter;
|
||||
use pbs_tools::tokio::TokioWriterAdapter;
|
||||
|
||||
/// Stream implementation to encode and upload .pxar archives.
|
||||
///
|
||||
@ -111,7 +112,7 @@ impl Stream for PxarBackupStream {
|
||||
}
|
||||
}
|
||||
|
||||
match pbs_runtime::block_in_place(|| self.rx.as_ref().unwrap().recv()) {
|
||||
match proxmox_async::runtime::block_in_place(|| self.rx.as_ref().unwrap().recv()) {
|
||||
Ok(data) => Poll::Ready(Some(data)),
|
||||
Err(_) => {
|
||||
let error = self.error.lock().unwrap();
|
||||
|
@ -5,12 +5,13 @@ use std::sync::{Arc, Mutex};
|
||||
|
||||
use anyhow::{bail, Error};
|
||||
|
||||
use proxmox_async::runtime::block_on;
|
||||
|
||||
use pbs_tools::crypt_config::CryptConfig;
|
||||
use pbs_api_types::CryptMode;
|
||||
use pbs_datastore::data_blob::DataBlob;
|
||||
use pbs_datastore::read_chunk::ReadChunk;
|
||||
use pbs_datastore::read_chunk::AsyncReadChunk;
|
||||
use pbs_runtime::block_on;
|
||||
|
||||
use super::BackupReader;
|
||||
|
||||
|
@ -194,7 +194,7 @@ pub async fn try_get(repo: &BackupRepository, url: &str) -> Value {
|
||||
}
|
||||
|
||||
pub fn complete_backup_group(_arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
pbs_runtime::main(async { complete_backup_group_do(param).await })
|
||||
proxmox_async::runtime::main(async { complete_backup_group_do(param).await })
|
||||
}
|
||||
|
||||
pub async fn complete_backup_group_do(param: &HashMap<String, String>) -> Vec<String> {
|
||||
@ -224,7 +224,7 @@ pub async fn complete_backup_group_do(param: &HashMap<String, String>) -> Vec<St
|
||||
}
|
||||
|
||||
pub fn complete_group_or_snapshot(arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
pbs_runtime::main(async { complete_group_or_snapshot_do(arg, param).await })
|
||||
proxmox_async::runtime::main(async { complete_group_or_snapshot_do(arg, param).await })
|
||||
}
|
||||
|
||||
pub async fn complete_group_or_snapshot_do(arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
@ -243,7 +243,7 @@ pub async fn complete_group_or_snapshot_do(arg: &str, param: &HashMap<String, St
|
||||
}
|
||||
|
||||
pub fn complete_backup_snapshot(_arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
pbs_runtime::main(async { complete_backup_snapshot_do(param).await })
|
||||
proxmox_async::runtime::main(async { complete_backup_snapshot_do(param).await })
|
||||
}
|
||||
|
||||
pub async fn complete_backup_snapshot_do(param: &HashMap<String, String>) -> Vec<String> {
|
||||
@ -275,7 +275,7 @@ pub async fn complete_backup_snapshot_do(param: &HashMap<String, String>) -> Vec
|
||||
}
|
||||
|
||||
pub fn complete_server_file_name(_arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
pbs_runtime::main(async { complete_server_file_name_do(param).await })
|
||||
proxmox_async::runtime::main(async { complete_server_file_name_do(param).await })
|
||||
}
|
||||
|
||||
pub async fn complete_server_file_name_do(param: &HashMap<String, String>) -> Vec<String> {
|
||||
@ -366,7 +366,7 @@ pub fn complete_chunk_size(_arg: &str, _param: &HashMap<String, String>) -> Vec<
|
||||
}
|
||||
|
||||
pub fn complete_auth_id(_arg: &str, param: &HashMap<String, String>) -> Vec<String> {
|
||||
pbs_runtime::main(async { complete_auth_id_do(param).await })
|
||||
proxmox_async::runtime::main(async { complete_auth_id_do(param).await })
|
||||
}
|
||||
|
||||
pub async fn complete_auth_id_do(param: &HashMap<String, String>) -> Vec<String> {
|
||||
|
Reference in New Issue
Block a user