This commit is contained in:
DingZQ
2025-03-01 21:48:41 +08:00
parent b6851ac321
commit 7d28bd8632
2 changed files with 11 additions and 8 deletions

View File

@@ -2135,16 +2135,16 @@ if __name__ == "__main__":
token = influxdb_info.token token = influxdb_info.token
org_name = influxdb_info.org org_name = influxdb_info.org
# client = InfluxDBClient(url=url, token=token) client = InfluxDBClient(url=url, token=token)
# step1: 检查连接状态初始化influxdb的buckets # step1: 检查连接状态初始化influxdb的buckets
# try: try:
# # delete_buckets(client, org_name) delete_buckets(client, org_name)
# create_and_initialize_buckets(client, org_name) create_and_initialize_buckets(client, org_name)
# except Exception as e: except Exception as e:
# print(f"连接失败: {e}") print(f"连接失败: {e}")
# finally: finally:
# client.close() client.close()
# step2: 先查询pg数据库中scada_info的信息然后存储SCADA数据到SCADA_data这个bucket里 # step2: 先查询pg数据库中scada_info的信息然后存储SCADA数据到SCADA_data这个bucket里
# query_pg_scada_info_realtime('bb') # query_pg_scada_info_realtime('bb')

View File

@@ -8,3 +8,6 @@ Setup instructions for WMH's work
Should manullay change code Should manullay change code
3. run create_template.py 3. run create_template.py
4. run influxdb_api.py
create buckets