From 23044f1338ecc7514b427425941d259481d907e9 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sun, 23 Feb 2025 09:51:32 +0800 Subject: [PATCH] Refine --- influxdb_api.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/influxdb_api.py b/influxdb_api.py index e4dc153..33eda9a 100644 --- a/influxdb_api.py +++ b/influxdb_api.py @@ -2147,7 +2147,7 @@ if __name__ == "__main__": # store_non_realtime_SCADA_data_to_influxdb(get_history_data_end_time='2025-02-08T12:00:00+08:00') # step3: 查询测试示例 - with InfluxDBClient(url=url, token=token, org=org_name) as client: + with InfluxDBClient(url=url, token=token, org=org_name, timeout=1000*10000) as client: # # 示例1:query_latest_record_by_ID # bucket_name = "realtime_simulation_result" # 数据存储的 bucket 名称 @@ -2208,8 +2208,11 @@ if __name__ == "__main__": # print("Link 数据:", link_records) # 示例13:query_scheme_all_record - node_records, link_records = query_scheme_all_record(scheme_Type='burst_Analysis', scheme_Name='scheme1') - print("Node 数据:", node_records) - print("Link 数据:", link_records) + # node_records, link_records = query_scheme_all_record(scheme_Type='burst_Analysis', scheme_Name='scheme1') + # print("Node 数据:", node_records) + # print("Link 数据:", link_records) + + results = query_all_record_by_date('2025-=02-12') + print(results)