#NEWLINE# def _on_warc_created_message( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# log . debug ( 'Warc with id %s' , self . message [ 'warc' ] [ 'id' ] ) #NEWLINE# warc = Warc . objects . create ( harvest = Harvest . objects . get ( harvest_id = self . message [ 'harvest' ] [ 'id' ] ) , warc_id = self . message [ 'warc' ] [ 'id' ] , path = self . message [ 'warc' ] [ 'path' ] , sha1 = self . message [ 'warc' ] [ 'sha1' ] , bytes = self . message [ 'warc' ] [ 'bytes' ] , date_created = iso8601 . parse_date ( self . message [ 'warc' ] [ 'date_created' ] ) ) #NEWLINE# warc . save ( ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# log . error ( 'Harvest model object not found for harvest status message: %s' , json . dumps ( self . message , indent = 4 ) )