mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	increase indexing speed
This commit is contained in:
		
							parent
							
								
									b7d310ef90
								
							
						
					
					
						commit
						6968e228e1
					
				@ -1,4 +1,5 @@
 | 
			
		||||
from django.core.management import BaseCommand
 | 
			
		||||
from django.db import transaction
 | 
			
		||||
 | 
			
		||||
from documents.mixins import Renderable
 | 
			
		||||
from documents.tasks import index_reindex, index_optimize
 | 
			
		||||
@ -18,7 +19,7 @@ class Command(Renderable, BaseCommand):
 | 
			
		||||
    def handle(self, *args, **options):
 | 
			
		||||
 | 
			
		||||
        self.verbosity = options["verbosity"]
 | 
			
		||||
 | 
			
		||||
        with transaction.atomic():
 | 
			
		||||
            if options['command'] == 'reindex':
 | 
			
		||||
                index_reindex()
 | 
			
		||||
            elif options['command'] == 'optimize':
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user