Add file influxdb_info and use information from the file

This commit is contained in:
DingZQ
2025-02-08 21:06:59 +08:00
parent d8c8eb1002
commit 6b1b15f28c
7 changed files with 43 additions and 18 deletions

View File

@@ -4,6 +4,7 @@ from datetime import datetime, timedelta, timezone
import schedule
import time
from influxdb_client import InfluxDBClient, BucketsApi, WriteApi, OrganizationsApi, Point, QueryApi
import influxdb_info
# 2025/02/06
@@ -69,9 +70,9 @@ def store_non_realtime_SCADA_data_task() -> None:
if __name__ == "__main__":
url = "http://localhost:8086" # 替换为你的InfluxDB实例地址
token = "Z4UZj9HuLwLlwoApywvT2nGVP3bwLy18y-sJQ7enzZlJd8YMzMWbBA6F-q4gBiZ-7-IqdxR5aR9LvicKiSNmnA==" # 替换为你的InfluxDB Token
org_name = "beibei" # 替换为你的Organization名称
url = influxdb_info.url
token = influxdb_info.token
org_name = influxdb_info.org
client = InfluxDBClient(url=url, token=token)