Using influxdb-python 5.3.1 in my client app, with an influxdb server version 1.6.4, when I write data using the write_points call, are there any exceptions that might be retryable? For example:
influx_conn = influxdb.InfluxDBClient(host='my_influxdb_server', username='mylogin', password=mypassword)
influx_monitored_data_points=[]
thing_being_monitored="xyzzy"
# Load up influx_monitored_data_points with data points for thing_being_monitored
try:
influx_conn.write_points(influx_monitored_data_points)
except:
print(f"Error writing monitoring data for {thing_being_monitored} to InfluxDB 'my_influxdb_server'")
raise # re-raise the error to print out all the gory details
Should I add any "except specific_exception:" clauses to catch and retry write_points on the existing connection?
Are there other errors indicating I should close the connection and wait before reopening and then retrying write_points with same data again?
Also, for errors I don't retry, can I assume the raise will always exist the program, or should I add and explicit sys.exit() call after the raise?
I'm a Python newbie so please be understanding. Thanks in advance