From 0ed828ba1d771b6a2f865141dc822f08bf36150f Mon Sep 17 00:00:00 2001 From: Their Name Date: Thu, 30 Dec 2021 18:09:50 +0000 Subject: [PATCH] fix 500 --- common/management/commands/reindex.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/management/commands/reindex.py b/common/management/commands/reindex.py index b00af326..8d634281 100644 --- a/common/management/commands/reindex.py +++ b/common/management/commands/reindex.py @@ -12,7 +12,7 @@ from datetime import timedelta from django.utils import timezone -BATCH_SIZE = 1000 +BATCH_SIZE = 10000 class Command(BaseCommand): @@ -35,4 +35,4 @@ class Command(BaseCommand): if items: Indexer.instance().update_documents(documents=items) while Indexer.get_stats()['isIndexing']: - sleep(0.1) + sleep(0.5) diff --git a/requirements.txt b/requirements.txt index 744ac60d..f9a5bc4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,4 @@ psycopg2 requests filetype setproctitle +tqdm