perf: Enqueue "removing of index" on web page save (#22409)
* perf: Enqueue "removing of index" on web page save * fix: Enqueue after commit Co-authored-by: Ankush Menat <ankushmenat@gmail.com> * fix: enqueue after commit --------- Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
parent
909457de3d
commit
2587d3e2e0
1 changed files with 2 additions and 2 deletions
|
|
@ -174,7 +174,7 @@ class WebsiteGenerator(Document):
|
|||
return
|
||||
|
||||
if self.is_website_published():
|
||||
frappe.enqueue(update_index_for_path, path=self.route)
|
||||
frappe.enqueue(update_index_for_path, path=self.route, enqueue_after_commit=True)
|
||||
elif self.route:
|
||||
# If the website is not published
|
||||
remove_document_from_index(self.route)
|
||||
frappe.enqueue(remove_document_from_index, path=self.route, enqueue_after_commit=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue