@task()
def update_ccxcon(course_id, cur_retry=0):
 course_key = CourseKey.from_string(course_id)
 try:
  api.course_info_to_ccxcon(course_key)
  log.info('Course update to CCXCon returned no errors. Course key: %s', course_id)
 except (ConnectionError, HTTPError, RequestException, TooManyRedirects, api.CCXConnServerError) as exp:
  log.error('Course update to CCXCon failed for course_id %s with error: %s', course_id, exp)
  if (cur_retry < 5):
   update_ccxcon.apply_async(kwargs={'course_id': course_id, 'cur_retry': (cur_retry + 1)}, countdown=(10 ** cur_retry))
   log.info('Requeued celery task for course key %s ; retry # %s', course_id, (cur_retry + 1))

@ task ( ) def update_ccxcon ( course_id , cur_retry = 0 ) : course_key = CourseKey . from_string ( course_id ) try : api . course_info_to_ccxcon ( course_key ) log . info ( 'Course update to CCXCon returned no errors. Course key: %s' , course_id ) except ( ConnectionError , HTTPError , RequestException , TooManyRedirects , api . CCXConnServerError ) as exp : log . error ( 'Course update to CCXCon failed for course_id %s with error: %s' , course_id , exp ) if ( cur_retry < 5 ) : update_ccxcon . apply_async ( kwargs = { 'course_id' : course_id , 'cur_retry' : ( cur_retry + 1 ) } , countdown = ( 10 ** cur_retry ) ) log . info ( 'Requeued celery task for course key %s ; retry # %s' , course_id , ( cur_retry + 1 ) )
pass through function to update course information on ccxcon .