mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -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,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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user