MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_client

Method get_client

api/app_analytics/influxdb_wrapper.py:54–63  ·  view source on GitHub ↗

A singleton InfluxDB client instance

(cls)

Source from the content-addressed store, hash-verified

52 @classmethod
53 @functools.cache
54 def get_client(cls) -> InfluxDBClient:
55 """A singleton InfluxDB client instance"""
56 retries = Retry(connect=3, read=3, redirect=3)
57 return InfluxDBClient(
58 url=settings.INFLUXDB_URL,
59 token=settings.INFLUXDB_TOKEN,
60 org=settings.INFLUXDB_ORG,
61 retries=retries,
62 timeout=30000, # Hard stop to prevent hanging requests
63 )
64
65 @classmethod
66 def get_downsampled_bucket(cls, size: DownsampleSize) -> str:

Calls

no outgoing calls