def enable_case_search(domain): from corehq.apps.case_search.tasks import reindex_case_search_for_domain config, created = CaseSearchConfig.objects.get_or_create(pk=domain) if not config.enabled: config.enabled = True config.save() reindex_case_search_for_domain.delay(domain)
def enable_case_search(domain): from corehq.apps.case_search.tasks import reindex_case_search_for_domain config, created = CaseSearchConfig.objects.get_or_create(pk=domain) if not config.enabled: config.enabled = True config.save() reindex_case_search_for_domain.delay(domain)
def _enable_search_index(domain, enabled): from corehq.apps.case_search.tasks import reindex_case_search_for_domain, delete_case_search_cases_for_domain from corehq.pillows.case_search import domains_needing_search_index domains_needing_search_index.clear() if enabled: reindex_case_search_for_domain.delay(domain) else: delete_case_search_cases_for_domain.delay(domain)
def enable_case_search(domain): from corehq.apps.case_search.tasks import reindex_case_search_for_domain from corehq.pillows.case_search import domains_needing_search_index config, created = CaseSearchConfig.objects.get_or_create(pk=domain) if not config.enabled: config.enabled = True config.save() case_search_enabled_for_domain.clear(domain) domains_needing_search_index.clear() reindex_case_search_for_domain.delay(domain)
def enable_case_search(domain): from corehq.apps.case_search.tasks import reindex_case_search_for_domain from corehq.pillows.case_search import domains_needing_search_index config, created = CaseSearchConfig.objects.get_or_create(pk=domain) if not config.enabled: config.enabled = True config.save() case_search_enabled_for_domain.clear(domain) domains_needing_search_index.clear() reindex_case_search_for_domain.delay(domain) return config