diff --git a/src/documents/management/commands/document_retagger.py b/src/documents/management/commands/document_retagger.py index 854117fdd..4a23faa86 100755 --- a/src/documents/management/commands/document_retagger.py +++ b/src/documents/management/commands/document_retagger.py @@ -1,5 +1,6 @@ import logging +import tqdm from django.core.management.base import BaseCommand from documents.classifier import load_classifier @@ -67,9 +68,7 @@ class Command(BaseCommand): classifier = load_classifier() - for document in documents: - logger.info( - f"Processing document {document.title}") + for document in tqdm.tqdm(documents): if options['correspondent']: set_correspondent( diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index ad63bf301..f46adbb16 100755 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -46,13 +46,13 @@ def set_correspondent(sender, selected = None if potential_count > 1: if use_first: - logger.info( + logger.debug( f"Detected {potential_count} potential correspondents, " f"so we've opted for {selected}", extra={'group': logging_group} ) else: - logger.info( + logger.debug( f"Detected {potential_count} potential correspondents, " f"not assigning any correspondent", extra={'group': logging_group}