move ApiConfig, FileLogger and CommandoSocket to proxmox-rest-server workspace
ApiConfig: avoid using pbs_config::backup_user() CommandoSocket: avoid using pbs_config::backup_user() FileLogger: avoid using pbs_config::backup_user() - use atomic_open_or_create_file() Auth Trait: moved definitions to proxmox-rest-server/src/lib.rs - removed CachedUserInfo patrameter - return user as String (not Authid) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
037f6b6d5e
commit
fd6d243843
@ -29,8 +29,7 @@ use pbs_tools::format::HumanByte;
|
||||
use pbs_tools::fs::{lock_dir_noblock, DirLockGuard};
|
||||
use pbs_tools::process_locker::ProcessLockSharedGuard;
|
||||
use pbs_config::{open_backup_lockfile, BackupLockGuard};
|
||||
|
||||
use crate::tools::fail_on_shutdown;
|
||||
use proxmox_rest_server::fail_on_shutdown;
|
||||
|
||||
lazy_static! {
|
||||
static ref DATASTORE_MAP: Mutex<HashMap<String, Arc<DataStore>>> = Mutex::new(HashMap::new());
|
||||
|
@ -172,7 +172,7 @@ fn verify_index_chunks(
|
||||
let check_abort = |pos: usize| -> Result<(), Error> {
|
||||
if pos & 1023 == 0 {
|
||||
verify_worker.worker.check_abort()?;
|
||||
crate::tools::fail_on_shutdown()?;
|
||||
proxmox_rest_server::fail_on_shutdown()?;
|
||||
}
|
||||
Ok(())
|
||||
};
|
||||
@ -184,7 +184,7 @@ fn verify_index_chunks(
|
||||
|
||||
for (pos, _) in chunk_list {
|
||||
verify_worker.worker.check_abort()?;
|
||||
crate::tools::fail_on_shutdown()?;
|
||||
proxmox_rest_server::fail_on_shutdown()?;
|
||||
|
||||
let info = index.chunk_info(pos).unwrap();
|
||||
|
||||
@ -376,7 +376,7 @@ pub fn verify_backup_dir_with_lock(
|
||||
});
|
||||
|
||||
verify_worker.worker.check_abort()?;
|
||||
crate::tools::fail_on_shutdown()?;
|
||||
proxmox_rest_server::fail_on_shutdown()?;
|
||||
|
||||
if let Err(err) = result {
|
||||
task_log!(
|
||||
|
Reference in New Issue
Block a user