#NEWLINE# def _on_export_status_message( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# log . debug ( 'Updating export with id %s' , self . message [ 'id' ] ) #NEWLINE# export = Export . objects . get ( export_id = self . message [ 'id' ] ) #NEWLINE# export . status = self . message [ 'status' ] #NEWLINE# export . infos = self . message . get ( 'infos' , [ ] ) #NEWLINE# export . warnings = self . message . get ( 'warnings' , [ ] ) #NEWLINE# export . errors = self . message . get ( 'errors' , [ ] ) #NEWLINE# export . date_started = iso8601 . parse_date ( self . message [ 'date_started' ] ) #NEWLINE# if ( 'date_ended' in self . message ) : #NEWLINE# #INDENT# export . date_ended = iso8601 . parse_date ( self . message [ 'date_ended' ] ) #NEWLINE# #UNINDENT# export . save ( ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# log . error ( 'Export model object not found for export status message: %s' , json . dumps ( self . message , indent = 4 ) )