1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-01-02 21:25:48 +00:00

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 @@ def read_async(fd):
elif parsed['type'] == 'file_status': elif parsed['type'] == 'file_status':
self.app.backup_log_event.emit(f'{parsed["path"]} ({parsed["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): elif parsed['type'] == 'archive_progress' and not parsed.get('finished', False):
msg = ( msg = (
f"{translate('BorgJob','Files')}: {parsed['nfiles']}, " f"{translate('BorgJob','Files')}: {parsed['nfiles']}, "

View file

@ -32,7 +32,7 @@ def prepare(cls, profile):
else: else:
ret['ok'] = False # Set back to false, so we can do our own checks here. 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}') cmd.append(f'{profile.repo.url}')
ret['ok'] = True ret['ok'] = True