perf: Enqueue "removing of index" on web page deletion (#23044)

This commit is contained in:
Suraj Shetty 2023-11-01 09:40:51 +05:30 committed by GitHub
parent 2375f2ee05
commit b56cbdfff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ class WebsiteGenerator(Document):
self.send_indexing_request("URL_DELETED")
# On deleting the doc, remove the page from the web_routes index
if self.allow_website_search_indexing():
remove_document_from_index(self.route)
frappe.enqueue(remove_document_from_index, path=self.route, enqueue_after_commit=True)
def is_website_published(self):
"""Return true if published in website"""