Don't update search on HTMLFile save
This causes a huge number of HTMLFile index updates to happen on doc building.
We already have logic to index HTMLFile's in bulk during builds,
so we don't need this.
@@ -76,40 +76,3 @@ def remove_project_delete(instance, *args, **kwargs):
# Do not index if autosync is disabled globally
if DEDConfig.autosync_enabled():
delete_objects_in_es.delay(**kwargs)
-
-
-@receiver(post_save, sender=HTMLFile)
-def index_html_file_save(instance, *args, **kwargs):
- """
- Save a HTMLFile instance based on the post_save signal.post_save.
-
- This uses Celery to do it async, replacing how django-elasticsearch-dsl does
- it.
- """
- from readthedocs.search.documents import PageDocument
- kwargs = {
- 'app_label': HTMLFile._meta.app_label,
- 'model_name': HTMLFile.__name__,
- 'document_class': str(PageDocument),
- 'objects_id': [instance.id],
- }
-
- # Do not index if autosync is disabled globally
- if DEDConfig.autosync_enabled():
- index_objects_to_es.delay(**kwargs)
-
-
-@receiver(pre_delete, sender=HTMLFile)
-def remove_html_file_delete(instance, *args, **kwargs):
- from readthedocs.search.documents import PageDocument
-
- kwargs = {
- 'app_label': HTMLFile._meta.app_label,
- 'model_name': HTMLFile.__name__,
- 'document_class': str(PageDocument),
- 'objects_id': [instance.id],
- }
-
- # Do not index if autosync is disabled globally
- if DEDConfig.autosync_enabled():
- delete_objects_in_es.delay(**kwargs)
