mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	added a progress bar to the reindex command.
This commit is contained in:
		
							parent
							
								
									2b57b80656
								
							
						
					
					
						commit
						46c0ab943f
					
				@ -1,5 +1,6 @@
 | 
			
		||||
import logging
 | 
			
		||||
 | 
			
		||||
import tqdm
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from whoosh.writing import AsyncWriter
 | 
			
		||||
 | 
			
		||||
@ -23,7 +24,7 @@ def index_reindex():
 | 
			
		||||
    ix = index.open_index(recreate=True)
 | 
			
		||||
 | 
			
		||||
    with AsyncWriter(ix) as writer:
 | 
			
		||||
        for document in documents:
 | 
			
		||||
        for document in tqdm.tqdm(documents):
 | 
			
		||||
            index.update_document(writer, document)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user