Skip to content

Allow configuring retries with from_config_file #506

@hterik

Description

@hterik

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:

  1. Calling InfluxDBClient.from_config_file, proxies into _BaseClient._from_config_file.
  2. _BaseClient._from_config_file calls _BaseClient constructor without the retries-parameter set, and no other option to tunnel through kwargs.
    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)
  3. 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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy