Commit d6fe9073 authored by Michal Čihař's avatar Michal Čihař

Provide tri state feedback for offload index processing

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent fe61f3a3
......@@ -103,10 +103,17 @@ def performance(request):
'production-indexing',
))
if appsettings.OFFLOAD_INDEXING:
if IndexUpdate.objects.count() < 20:
index_updates = True
elif IndexUpdate.objects.count() < 200:
index_updates = None
else:
index_updates = False
checks.append((
# Translators: Indexing is postponed to cron job
_('Indexing offloading processing'),
IndexUpdate.objects.count() < 20,
index_updates,
'production-indexing',
))
# Check for sane caching
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment