From 1a6d14f1f597e855c3b864917361bd552de6ea7d Mon Sep 17 00:00:00 2001 From: Johannes Ott Date: Sun, 7 Jan 2024 21:42:47 +0100 Subject: [PATCH] Changed error messages Signed-off-by: Johannes Ott --- solaredge2mqtt/influxdb.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/solaredge2mqtt/influxdb.py b/solaredge2mqtt/influxdb.py index 1a3edd5..27502d1 100644 --- a/solaredge2mqtt/influxdb.py +++ b/solaredge2mqtt/influxdb.py @@ -144,17 +144,13 @@ def flush_loop(self) -> None: write_api = self.client.write_api( success_callback=self.write_success_callback, error_callback=self.write_error_callback, - retry_callback=self.write_retry_callback, + retry_callback=self.write_error_callback, ) write_api.write(bucket=self.bucket_raw, record=self.loop_points) self.loop_points = [] def write_success_callback(self, conf: (str, str, str), data: str) -> None: - logger.debug(f"Write success: {conf} {data}") + logger.debug(f"InfluxDB batch written: {conf} {data}") def write_error_callback(self, conf: (str, str, str), error: InfluxDBError) -> None: - logger.error(f"Write error: {conf} {error}") - - def write_retry_callback(self, conf: (str, str, str), error: InfluxDBError) -> None: - logger.warning(f"Write retry error: {conf} {error}") - + logger.error(f"InfluxDB error while writting: {conf} {error}")