mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	better logging for the retagger
This commit is contained in:
		| @@ -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( | ||||
|   | ||||
| @@ -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} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler