@task()
def update_search_index(course_id, triggered_time_isoformat):
 try:
  course_key = CourseKey.from_string(course_id)
  CoursewareSearchIndexer.index(modulestore(), course_key, triggered_at=_parse_time(triggered_time_isoformat))
 except SearchIndexingError as exc:
  LOGGER.error('Search indexing error for complete course %s - %s', course_id, unicode(exc))
 else:
  LOGGER.debug('Search indexing successful for complete course %s', course_id)

@ task ( ) def update_search_index ( course_id , triggered_time_isoformat ) : try : course_key = CourseKey . from_string ( course_id ) CoursewareSearchIndexer . index ( modulestore ( ) , course_key , triggered_at = _parse_time ( triggered_time_isoformat ) ) except SearchIndexingError as exc : LOGGER . error ( 'Search indexing error for complete course %s - %s' , course_id , unicode ( exc ) ) else : LOGGER . debug ( 'Search indexing successful for complete course %s' , course_id )
updates course search index .