Skip to content

Commit 2c7b03c

Browse files
ericholschersafwanrahman
authored andcommitted
Fix bug where we were not indexing Sphinx HTMLDir projects (#4685)
Also try and fix a bug with queue selection around reindexing.
1 parent 93a60e9 commit 2c7b03c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

readthedocs/search/documents.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ def get_queryset(self):
120120

121121
# Do not index files that belong to non sphinx project
122122
# Also do not index certain files
123-
queryset = (queryset.filter(project__documentation_type='sphinx')
123+
queryset = (queryset.filter(project__documentation_type__contains='sphinx')
124124
.exclude(name__in=self.excluded_files))
125125
return queryset

readthedocs/search/management/commands/reindex_elasticsearch.py

+2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def _run_reindex_tasks(self, models, queue):
7878
# http://celery.readthedocs.io/en/latest/userguide/canvas.html#chords
7979
chord_tasks = chord(header=indexing_tasks, body=post_index_task)
8080
if queue:
81+
pre_index_task.set(queue=queue)
8182
chord_tasks.set(queue=queue)
83+
missed_index_task.set(queue=queue)
8284
# http://celery.readthedocs.io/en/latest/userguide/canvas.html#chain
8385
chain(pre_index_task, chord_tasks, missed_index_task).apply_async(**apply_async_kwargs)
8486

0 commit comments

Comments
 (0)