Commit 2333c8fa authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Slice component:

- Reduced log level in MetricsExporter
parent e9ed3dc7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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(
@@ -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
@@ -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