add an AsyncReadChunk trait

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2020-06-12 11:38:21 +02:00
parent a609cf210e
commit 4d16badf6f
4 changed files with 93 additions and 4 deletions

View File

@ -34,7 +34,7 @@ async fn pull_index_chunks<I: IndexFile>(
continue;
}
//worker.log(format!("sync {} chunk {}", pos, proxmox::tools::digest_to_hex(digest)));
let chunk = chunk_reader.read_raw_chunk(&digest)?;
let chunk = chunk_reader.read_raw_chunk(&digest).await?;
target.insert_chunk(&chunk, &digest)?;
}