def _view_metrics(self, queue_type, queue_id):
response = {<EOL>'<STR_LIT:status>': '<STR_LIT>'<EOL>}<EOL>request_data = {}<EOL>if queue_type:<EOL><INDENT>request_data['<STR_LIT>'] = queue_type<EOL><DEDENT>if queue_id:<EOL><INDENT>request_data['<STR_LIT>'] = queue_id<EOL><DEDENT>try:<EOL><INDENT>response = self.sq.metrics(**request_data)<EOL><DEDENT>except Exception as e:<EOL><INDENT>response['<STR_LIT:message>'] = e.message<EOL>return jsonify(**response), <NUM_LIT><EOL><DEDENT>return jsonify(**response)<EOL>
Gets SharQ metrics based on the params.