Add API queryallschemeallrecords

This commit is contained in:
DingZQ
2025-03-16 12:45:28 +08:00
parent 4058ddaed7
commit d404809111
2 changed files with 25 additions and 2 deletions

View File

@@ -333,12 +333,13 @@ def store_realtime_SCADA_data_to_influxdb(get_real_value_time: str, bucket: str
if client.ping():
pass
else:
print("{} -- Failed to connect to InfluxDB.".format(
datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
print("{} -- Failed to connect to InfluxDB.".format( datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
write_options = WriteOptions(
jitter_interval=200, # 添加抖动以避免同时写入
max_retry_delay=30000 # 最大重试延迟(毫秒)
)
write_api = client.write_api(write_options=write_options)
# 创建一个临时存储点数据的列表
points_to_write = []
@@ -2594,6 +2595,7 @@ def query_scheme_all_record(scheme_Type: str, scheme_Name: str, query_date: str,
# 2025/03/04
# burst_Analysis
def query_scheme_all_record_property(scheme_Type: str, scheme_Name: str, query_date: str, type: str, property: str,
bucket: str="scheme_simulation_result", client: InfluxDBClient=client) -> list:
"""