mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	increase indexing speed
This commit is contained in:
		| @@ -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,8 +19,8 @@ class Command(Renderable, BaseCommand): | ||||
|     def handle(self, *args, **options): | ||||
|  | ||||
|         self.verbosity = options["verbosity"] | ||||
|  | ||||
|         if options['command'] == 'reindex': | ||||
|             index_reindex() | ||||
|         elif options['command'] == 'optimize': | ||||
|             index_optimize() | ||||
|         with transaction.atomic(): | ||||
|             if options['command'] == 'reindex': | ||||
|                 index_reindex() | ||||
|             elif options['command'] == 'optimize': | ||||
|                 index_optimize() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler