Loading src/slice/service/slice_grouper/MetricsExporter.py +4 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class MetricsExporter(): with Sender(METRICSDB_HOSTNAME, METRICSDB_ILP_PORT) as sender: sender.row(METRICSDB_TABLE_SLICE_GROUPS, symbols=symbols, columns=columns, at=dt_timestamp) sender.flush() LOGGER.info(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) LOGGER.debug(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) return except (Exception, IngressError): # pylint: disable=broad-except LOGGER.exception(MSG_EXPORT_FAILED.format( Loading @@ -95,7 +95,7 @@ class MetricsExporter(): try: result = self.rest_request(sql_query) if not result: raise Exception LOGGER.info('Point {:s} deleted'.format(str(slice_uuid))) LOGGER.debug('Point {:s} deleted'.format(str(slice_uuid))) except Exception as e: LOGGER.warning('Point {:s} cannot be deleted. {:s}'.format(str(slice_uuid), str(e))) raise Loading @@ -114,10 +114,10 @@ class MetricsExporter(): json_response = response.json() if 'ddl' in json_response: LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) return True elif 'dataset' in json_response: LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) return json_response['dataset'] except Exception: # pylint: disable=broad-except Loading Loading
src/slice/service/slice_grouper/MetricsExporter.py +4 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class MetricsExporter(): with Sender(METRICSDB_HOSTNAME, METRICSDB_ILP_PORT) as sender: sender.row(METRICSDB_TABLE_SLICE_GROUPS, symbols=symbols, columns=columns, at=dt_timestamp) sender.flush() LOGGER.info(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) LOGGER.debug(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) return except (Exception, IngressError): # pylint: disable=broad-except LOGGER.exception(MSG_EXPORT_FAILED.format( Loading @@ -95,7 +95,7 @@ class MetricsExporter(): try: result = self.rest_request(sql_query) if not result: raise Exception LOGGER.info('Point {:s} deleted'.format(str(slice_uuid))) LOGGER.debug('Point {:s} deleted'.format(str(slice_uuid))) except Exception as e: LOGGER.warning('Point {:s} cannot be deleted. {:s}'.format(str(slice_uuid), str(e))) raise Loading @@ -114,10 +114,10 @@ class MetricsExporter(): json_response = response.json() if 'ddl' in json_response: LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) return True elif 'dataset' in json_response: LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) return json_response['dataset'] except Exception: # pylint: disable=broad-except Loading