Influx related functionality finished

This commit is contained in:
marys
2025-09-25 10:40:29 +02:00
commit 795a494950
6 changed files with 128 additions and 0 deletions

19
internal_loop.py Normal file
View File

@@ -0,0 +1,19 @@
import asyncio
from influxdb_client.client.influxdb_client_async import InfluxDBClientAsync
from config import INFLUX_BUCKET, INFLUX_ORG
from influx_related import get_influx_data
async def internal_loop(influxdb_client: InfluxDBClientAsync):
i = 0
while True:
print("internal_loop", i)
i += 1
try:
records = await get_influx_data(influxdb_client)
print("influx records:", len(records))
[print(" -", i) for i in records]
except Exception as e:
print(e)
await asyncio.sleep(5)