chore: revert "feat: make search indexing optional in migrate"
This reverts commit b5fe9d4f7be8dae3e3e946b4327bf44b9a35448c.
This commit is contained in:
parent
8b7ae16cdd
commit
20f06f0d24
2 changed files with 6 additions and 6 deletions
|
|
@ -274,9 +274,9 @@ def disable_user(context, email):
|
|||
@click.command('migrate')
|
||||
@click.option('--rebuild-website', help="Rebuild webpages after migration")
|
||||
@click.option('--skip-failing', is_flag=True, help="Skip patches that fail to run")
|
||||
@click.option('--index-site', is_flag=True, help="Index public web pages")
|
||||
@click.option('--skip-search-index', is_flag=True, help="Skip patches that fail to run")
|
||||
@pass_context
|
||||
def migrate(context, rebuild_website=False, skip_failing=False, index_site=False):
|
||||
def migrate(context, rebuild_website=False, skip_failing=False, skip_search_index=False):
|
||||
"Run patches, sync schema and rebuild files/translations"
|
||||
from frappe.migrate import migrate
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ def migrate(context, rebuild_website=False, skip_failing=False, index_site=False
|
|||
context.verbose,
|
||||
rebuild_website=rebuild_website,
|
||||
skip_failing=skip_failing,
|
||||
index_site=index_site
|
||||
skip_search_index=skip_search_index
|
||||
)
|
||||
finally:
|
||||
frappe.destroy()
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ from frappe.core.doctype.scheduled_job_type.scheduled_job_type import sync_jobs
|
|||
from frappe.search.website_search import build_index_for_all_routes
|
||||
|
||||
|
||||
def migrate(verbose=True, rebuild_website=False, skip_failing=False, index_site=False):
|
||||
def migrate(verbose=True, rebuild_website=False, skip_failing=False, skip_search_index=False):
|
||||
'''Migrate all apps to the latest version, will:
|
||||
- run before migrate hooks
|
||||
- run patches
|
||||
|
|
@ -89,9 +89,9 @@ Otherwise, check the server logs and ensure that all the required services are r
|
|||
frappe.get_attr(fn)()
|
||||
|
||||
# add static pages to global search
|
||||
if index_site:
|
||||
if not skip_search_index:
|
||||
# Run this last as it updates the current session
|
||||
build_index_for_all_routes()
|
||||
full_text_search.build_index_for_all_routes()
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue