Improve influxdb error handling (#27225)

This commit is contained in:
definitio 2019-10-05 23:43:57 +04:00 committed by Paulus Schoutsen
parent 46ac98379e
commit 9c08c35881

View File

@ -353,7 +353,11 @@ class InfluxThread(threading.Thread):
_LOGGER.debug("Wrote %d events", len(json))
break
except (exceptions.InfluxDBClientError, IOError) as err:
except (
exceptions.InfluxDBClientError,
exceptions.InfluxDBServerError,
IOError,
) as err:
if retry < self.max_tries:
time.sleep(RETRY_DELAY)
else: