Refine
This commit is contained in:
@@ -1306,7 +1306,7 @@ def query_curve_by_ID_property_daterange(ID: str, type: str, property: str, star
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
url = influxdb_info.url
|
url = influxdb_info.url
|
||||||
token = influxdb_info.token
|
token = influxdb_info.token
|
||||||
org_name = InfluxDBClient.org
|
org_name = influxdb_info.org
|
||||||
|
|
||||||
client = InfluxDBClient(url=url, token=token)
|
client = InfluxDBClient(url=url, token=token)
|
||||||
|
|
||||||
|
|||||||
7
main.py
7
main.py
@@ -32,6 +32,7 @@ from influxdb_client import InfluxDBClient, BucketsApi, WriteApi, OrganizationsA
|
|||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
import influxdb_info
|
||||||
import influxdb_api
|
import influxdb_api
|
||||||
|
|
||||||
JUNCTION = 0
|
JUNCTION = 0
|
||||||
@@ -61,9 +62,9 @@ app = FastAPI()
|
|||||||
redis_client = redis.Redis(host="localhost", port=6379, db=0)
|
redis_client = redis.Redis(host="localhost", port=6379, db=0)
|
||||||
|
|
||||||
# influxdb数据库连接信息
|
# influxdb数据库连接信息
|
||||||
influx_url = "http://localhost:8086" # 替换为你的InfluxDB实例地址
|
influx_url = influxdb_info.url
|
||||||
influx_token = "xGDM5RZqRJAuzAGS-otXUdC2NFdY75qJAjRLqAB4p5WcIIAlIUpOpT8_yA16AOHmJWerwQ_08gwb84sy42jnZQ==" # 替换为你的InfluxDB Token
|
influx_token = influxdb_info.token
|
||||||
influx_org_name = "TJWATERORG" # 替换为你的Organization名称
|
influx_org_name = influxdb_info.org
|
||||||
influx_client = InfluxDBClient(url=influx_url, token=influx_token, org=influx_org_name)
|
influx_client = InfluxDBClient(url=influx_url, token=influx_token, org=influx_org_name)
|
||||||
|
|
||||||
# 配置日志记录器
|
# 配置日志记录器
|
||||||
|
|||||||
Reference in New Issue
Block a user