@task(queue='web')
def update_search(version_pk, commit, delete_non_commit_files=True):
 version = Version.objects.get(pk=version_pk)
 if version.project.is_type_sphinx:
  page_list = process_all_json_files(version, build_dir=False)
 elif version.project.is_type_mkdocs:
  page_list = process_mkdocs_json(version, build_dir=False)
 else:
  log.error('Unknown documentation type: %s', version.project.documentation_type)
  return
 log_msg = ' '.join([page['path'] for page in page_list])
 log.info('(Search Index) Sending Data: %s [%s]', version.project.slug, log_msg)
 index_search_request(version=version, page_list=page_list, commit=commit, project_scale=0, page_scale=0, section=False, delete=delete_non_commit_files)

@ task ( queue = 'web' ) def update_search ( version_pk , commit , delete_non_commit_files = True ) : version = Version . objects . get ( pk = version_pk ) if version . project . is_type_sphinx : page_list = process_all_json_files ( version , build_dir = False ) elif version . project . is_type_mkdocs : page_list = process_mkdocs_json ( version , build_dir = False ) else : log . error ( 'Unknown documentation type: %s' , version . project . documentation_type ) return log_msg = ' ' . join ( [ page [ 'path' ] for page in page_list ] ) log . info ( '(Search Index) Sending Data: %s [%s]' , version . project . slug , log_msg ) index_search_request ( version = version , page_list = page_list , commit = commit , project_scale = 0 , page_scale = 0 , section = False , delete = delete_non_commit_files )
task to update search indexes .