-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Proposal:
I would like to configure the API url using a config-file, and still have the option to configure the retries
parameter in the InfluxDBClient
Current behavior:
- Calling
InfluxDBClient.from_config_file
, proxies into_BaseClient._from_config_file
. _BaseClient._from_config_file
calls _BaseClient constructor without theretries
-parameter set, and no other option to tunnel through kwargs.
influxdb-client-python/influxdb_client/client/_base.py
Lines 169 to 172 in ee24b3e
return cls(url, token, debug=debug, timeout=_to_int(timeout), org=org, default_tags=default_tags, enable_gzip=enable_gzip, verify_ssl=_to_bool(verify_ssl), ssl_ca_cert=ssl_ca_cert, connection_pool_maxsize=_to_int(connection_pool_maxsize), auth_basic=_to_bool(auth_basic), profilers=profilers, proxy=proxy) - where
retries
is being read from kwargs, that was never passed in from the calls above:
self.retries = kwargs.get('retries', False)
Desired behavior:
Either allow retries to be configured in the config-file, or add an additional parameter to InfluxDBClient.from_config_file
that allows this to be set.
Use case:
Client-side retries is always important for a stable system. Without this option, the from_config_file function is very hard to motivate and instead one has call the InfluxDBClient constructor and provide all parameters manually.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request