increase indexing speed

This commit is contained in:
jonaswinkler 2020-12-22 13:04:22 +01:00
parent b7d310ef90
commit 6968e228e1

View File

@ -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':