Show progress on repo check (#1513)

Start `borg check` with option `--progress` and handle the progress messages. Now the long repo check phase won't look like a freeze in vorta because vorta will show status updates. Fixes #1497.

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
This commit is contained in:
endumiuz 2022-12-25 13:55:03 +01:00 committed by GitHub
parent af8b146acc
commit 225e84f115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -277,6 +277,8 @@ class BorgJob(JobInterface, BackupProfileMixin):
elif parsed['type'] == 'file_status':
self.app.backup_log_event.emit(f'{parsed["path"]} ({parsed["status"]})', {})
elif parsed['type'] == 'progress_percent' and parsed.get("message"):
self.app.backup_log_event.emit(f'{parsed["message"]}', {})
elif parsed['type'] == 'archive_progress' and not parsed.get('finished', False):
msg = (
f"{translate('BorgJob','Files')}: {parsed['nfiles']}, "

View File

@ -32,7 +32,7 @@ class BorgCheckJob(BorgJob):
else:
ret['ok'] = False # Set back to false, so we can do our own checks here.
cmd = ['borg', 'check', '--info', '--log-json']
cmd = ['borg', 'check', '--info', '--log-json', '--progress']
cmd.append(f'{profile.repo.url}')
ret['ok'] = True