Merge branch 'master' of https://e.coding.net/tjwater/tjwatercloud/TJWaterServer
This commit is contained in:
@@ -171,7 +171,11 @@ def query_pg_scada_info_non_realtime(name: str) -> None:
|
|||||||
# 2025/03/23
|
# 2025/03/23
|
||||||
def get_new_client() -> InfluxDBClient:
|
def get_new_client() -> InfluxDBClient:
|
||||||
"""每次调用返回一个新的 InfluxDBClient 实例。"""
|
"""每次调用返回一个新的 InfluxDBClient 实例。"""
|
||||||
return InfluxDBClient(url=url, token=token, org=org_name, timeout=600*1000) # 600 seconds
|
return InfluxDBClient(url=url,
|
||||||
|
token=token,
|
||||||
|
org=org_name,
|
||||||
|
enable_gzip=True,
|
||||||
|
timeout=600*1000) # 600 seconds
|
||||||
|
|
||||||
# 2025/04/11, DingZQ
|
# 2025/04/11, DingZQ
|
||||||
def create_write_options() -> WriteOptions:
|
def create_write_options() -> WriteOptions:
|
||||||
@@ -3115,11 +3119,11 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
client = InfluxDBClient(url=url, token=token)
|
client = InfluxDBClient(url=url, token=token)
|
||||||
# step1: 检查连接状态,初始化influxdb的buckets
|
# step1: 检查连接状态,初始化influxdb的buckets
|
||||||
# try:
|
try:
|
||||||
# # delete_buckets(org_name)
|
# delete_buckets(org_name)
|
||||||
# create_and_initialize_buckets(org_name)
|
create_and_initialize_buckets(org_name)
|
||||||
# except Exception as e:
|
except Exception as e:
|
||||||
# print(f"连接失败: {e}")
|
print(f"连接失败: {e}")
|
||||||
|
|
||||||
|
|
||||||
# step2: 先查询pg数据库中scada_info的信息,然后存储SCADA数据到SCADA_data这个bucket里
|
# step2: 先查询pg数据库中scada_info的信息,然后存储SCADA数据到SCADA_data这个bucket里
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
REM f:
|
REM f:
|
||||||
REM cd "f:\DEV\GitHub\TJWaterServer"
|
REM cd "f:\DEV\GitHub\TJWaterServer"
|
||||||
|
|
||||||
|
git pull
|
||||||
|
|
||||||
REM call startpg.bat
|
REM call startpg.bat
|
||||||
cd C:\SourceCode\Server
|
cd C:\SourceCode\Server
|
||||||
REM uvicorn main:app --host 0.0.0.0 --port 80 --reload
|
REM uvicorn main:app --host 0.0.0.0 --port 80 --reload
|
||||||
|
|||||||
Reference in New Issue
Block a user