diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-07-16 14:30:05 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-07-16 14:30:05 -0400 |
commit | 587c544ab0d61ed4e52bd787a9da60a31686fce0 (patch) | |
tree | 81970f6b50d15876cb90439caa8a610be73893e2 | |
parent | c543bc9da01b086f75888147d9f7937bd7cd95a4 (diff) | |
download | grokmirror-587c544ab0d61ed4e52bd787a9da60a31686fce0.tar.gz |
A few more UI tweaks for grok-fsck
Be consistent telling us analyzed/queued/total counts.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | grokmirror/fsck.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py index 7afacf3..307a706 100755 --- a/grokmirror/fsck.py +++ b/grokmirror/fsck.py @@ -619,7 +619,7 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, logger.info(' fetch: fetching %s', gitdir) grokmirror.fetch_objstore_repo(obstrepo, fullpath) run_git_repack(fullpath, config, level=1, prune=m_prune) - logger.info(' ---: %s analyzed, %s total', analyzed, len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) obst_roots[obstrepo] = grokmirror.get_repo_roots(obstrepo, force=True) elif altdir.find(obstdir) != 0: @@ -638,7 +638,8 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, if success: set_precious_objects(altdir, enabled=False) run_git_repack(altdir, config, level=1, prune=False) - logger.info(' ---: %s analyzed, %s total', analyzed, len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), + len(status)) else: logger.critical('Unsuccessful fetching %s into %s', altdir, os.path.basename(obstrepo)) obstrepo = None @@ -658,7 +659,7 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, # Don't prune, because there may be objects others are still borrowing # It can only be pruned once the full migration is completed run_git_repack(altdir, config, level=1, prune=False) - logger.info(' ---: %s analyzed, %s total', analyzed, len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) else: logger.critical('Unsuccessful fetching %s into %s', altdir, os.path.basename(obstrepo)) obstrepo = None @@ -674,7 +675,7 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, grokmirror.fetch_objstore_repo(obstrepo, fullpath) set_precious_objects(fullpath, enabled=False) run_git_repack(fullpath, config, level=1, prune=m_prune) - logger.info(' ---: %s analyzed, %s total', analyzed, len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) else: logger.info(' fetch: not fetching %s (private)', gitdir) @@ -736,13 +737,13 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, logger.info(' queued: %s (full repack)', fullpath) else: logger.info(' queued: %s (repack)', fullpath) - logger.info(' ---: %s queued, %s total', len(to_process), len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) elif repack_only or repack_all_quick or repack_all_full: continue elif schedcheck <= today or force: to_process.add((fullpath, 'fsck', None)) logger.info(' queued: %s (fsck)', fullpath) - logger.info(' ---: %s queued, %s total', len(to_process), len(status)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) if obst_changes: # Refresh the alt repo map cache @@ -897,14 +898,14 @@ def fsck_mirror(config, verbose=False, force=False, repack_only=False, logger.info(' queued: %s (full repack)', os.path.basename(obstrepo)) else: logger.info(' queued: %s (repack)', os.path.basename(obstrepo)) - logger.info(' ---: %s queued, %s total', len(to_process), len(obstrepos)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) elif repack_only or repack_all_quick or repack_all_full: continue elif (nextcheck <= today or force) and not repack_only: status[obstrepo]['nextcheck'] = nextcheck.strftime('%F') to_process.add((obstrepo, 'fsck', None)) logger.info(' queued: %s (fsck)', os.path.basename(obstrepo)) - logger.info(' ---: %s queued, %s total', len(to_process), len(obstrepos)) + logger.info(' ---: %s analyzed, %s queued, %s total', analyzed, len(to_process), len(status)) if obst_changes: # We keep the same mtime, because the repos themselves haven't changed |