Refine
This commit is contained in:
@@ -1908,12 +1908,15 @@ def query_all_records_by_date_with_type(query_date: str, query_type: str, bucket
|
||||
print('utc_start_time', utc_start_time)
|
||||
print('utc_stop_time', utc_stop_time)
|
||||
|
||||
print('utc_start_time.isoformat', utc_start_time.isoformat())
|
||||
print('utc_stop_time.isoformat', utc_stop_time.isoformat())
|
||||
|
||||
print('measurement', query_type)
|
||||
|
||||
# 构建 Flux 查询语句
|
||||
flux_query = f'''
|
||||
from(bucket: "{bucket}")
|
||||
|> range(start: {utc_start_time}, stop: {utc_stop_time})
|
||||
|> range(start: {utc_start_time.isoformat()}, stop: {utc_stop_time.isoformat()})
|
||||
|> filter(fn: (r) => r["_measurement"] == "{query_type}" and r["date"] == "{query_date}")
|
||||
|> pivot(
|
||||
rowKey:["_time"],
|
||||
|
||||
Reference in New Issue
Block a user