cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a0781d7b9e
commit
0f198b82f5
@ -11,7 +11,7 @@ use pbs_api_types::{BackupType, GroupFilter, BACKUP_DATE_REGEX, BACKUP_FILE_REGE
|
||||
use pbs_config::{open_backup_lockfile, BackupLockGuard};
|
||||
|
||||
use crate::manifest::{MANIFEST_BLOB_NAME, MANIFEST_LOCK_NAME};
|
||||
use crate::{DataStore, DataBlob};
|
||||
use crate::{DataBlob, DataStore};
|
||||
|
||||
/// BackupGroup is a directory containing a list of BackupDir
|
||||
#[derive(Clone)]
|
||||
|
@ -96,7 +96,12 @@ async fn run() -> Result<(), Error> {
|
||||
watchdog_init();
|
||||
|
||||
let init_future = async move {
|
||||
match tokio::time::timeout(std::time::Duration::from_secs(120), tokio::task::spawn_blocking(init_disk_state)).await {
|
||||
match tokio::time::timeout(
|
||||
std::time::Duration::from_secs(120),
|
||||
tokio::task::spawn_blocking(init_disk_state),
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(res) => res.map_err(|err| format_err!("disk init failed: {}", err)),
|
||||
Err(_) => bail!("disk init timed out after 120 seconds"),
|
||||
}
|
||||
@ -114,7 +119,10 @@ async fn run() -> Result<(), Error> {
|
||||
let acceptor = hyper::server::accept::from_stream(receiver_stream);
|
||||
|
||||
let hyper_future = async move {
|
||||
hyper::Server::builder(acceptor).serve(rest_server).await.map_err(|err| format_err!("hyper finished with error: {}", err))
|
||||
hyper::Server::builder(acceptor)
|
||||
.serve(rest_server)
|
||||
.await
|
||||
.map_err(|err| format_err!("hyper finished with error: {}", err))
|
||||
};
|
||||
|
||||
tokio::try_join!(init_future, hyper_future)?;
|
||||
|
@ -40,10 +40,7 @@ impl VerifyWorker {
|
||||
}
|
||||
}
|
||||
|
||||
fn verify_blob(
|
||||
backup_dir: &BackupDir,
|
||||
info: &FileInfo,
|
||||
) -> Result<(), Error> {
|
||||
fn verify_blob(backup_dir: &BackupDir, info: &FileInfo) -> Result<(), Error> {
|
||||
let blob = backup_dir.load_blob(&info.filename)?;
|
||||
|
||||
let raw_size = blob.raw_size();
|
||||
|
Loading…
Reference in New Issue
Block a user