Closed obriat closed 3 years ago
If it seems better to you, I'll remade this PR.
I also didn't try to test the state of the influxdb_client parameter... I also discover that you can provide a retry strategy to it : https://github.com/influxdata/influxdb-client-python#http-retry-strategy with a custom backoff_factor https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html
Not moving forward with this PR. Use the .ping method to check for connectivity.
Yeah
__init__
shouldn't return anything. But adding a new parameter and returning the entire instance to check the connection seems like an overkill.Please make it so that it re-throws the exception in case of error instead so users can handle it as they want....
We can also add the retry mechanism later inside the library... In another PR.