Reduce min scan interval to 10s for InfluxDB (#53276)

This commit is contained in:
broadcasttechie 2021-07-26 13:32:42 +01:00 committed by GitHub
parent 882c323551
commit ad730524c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -84,7 +84,7 @@ TEST_QUERY_V1 = "SHOW DATABASES;"
TEST_QUERY_V2 = "buckets()"
CODE_INVALID_INPUTS = 400
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60)
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=10)
RE_DIGIT_TAIL = re.compile(r"^[^\.]*\d+\.?\d+[^\.]*$")
RE_DECIMAL = re.compile(r"[^\d.]+")

View file

@ -1,7 +1,9 @@
"""InfluxDB component which allows you to get data from an Influx database."""
from __future__ import annotations
import datetime
import logging
from typing import Final
import voluptuous as vol
@ -62,6 +64,8 @@ from .const import (
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL: Final = datetime.timedelta(seconds=60)
def _merge_connection_config_into_query(conf, query):
"""Merge connection details into each configured query."""