tape: also abort backup/restore on server shutdown

This commit is contained in:
Dietmar Maurer
2021-03-02 07:19:31 +01:00
parent d64226efee
commit 9bd81bb384
3 changed files with 10 additions and 0 deletions

View File

@ -378,6 +378,7 @@ fn restore_chunk_archive<'a>(
while let Some((digest, blob)) = decoder.next_chunk()? {
worker.check_abort()?;
crate::tools::fail_on_shutdown()?;
if let Some(datastore) = datastore {
let chunk_exists = datastore.cond_touch_chunk(&digest, false)?;
@ -477,6 +478,7 @@ fn try_restore_snapshot_archive<R: pxar::decoder::SeqRead>(
loop {
worker.check_abort()?;
crate::tools::fail_on_shutdown()?;
let entry = match decoder.next() {
None => break,