#NEWLINE# def _process_request( self , data ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . request = json . loads ( data . decode ( 'utf-8' ) ) #NEWLINE# rpc . add_get_id ( self . request ) #NEWLINE# log . info ( 'Request - {}' . format ( self . request ) ) #NEWLINE# if ( ( self . request [ 'service' ] != self . service_short_name ) and ( ( self . request [ 'service' ] + ':latest' ) != self . service_short_name ) ) : #NEWLINE# #INDENT# log . warn ( 'Service request ({}) sent to wrong service ({})' . format ( self . request [ 'service' ] , data . service_short_name ) ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# _e = rpc . exc_to_json_error ( rpc . ParseError ( dict ( exception = repr ( e ) ) ) ) #NEWLINE# return ( True , _e ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( False , self . request )