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:
parent
af8b146acc
commit
225e84f115
2 changed files with 3 additions and 1 deletions
|
@ -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']}, "
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue