This commit is contained in:
DingZQ
2025-03-22 12:12:57 +08:00
parent bf8f7d08e1
commit aab5de2840

View File

@@ -5,9 +5,11 @@ import shutil
import redis
import urllib.request
def query_all_records_by_date_with_type(date: str):
def queryallrecordsbydatewithtype(date: str):
print(f'queryallrecordsbydatewithtype: {date}')
try:
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydatewithtype/?querydate={date}&querytype=node')
response = urllib.request.urlopen(f'http://localhost/{method_name}/?querydate={date}&querytype=node')
html = response.read().decode('utf-8')
#print(html)
@@ -18,6 +20,8 @@ def query_all_records_by_date_with_type(date: str):
print("Error")
def queryallrecordsbydateproperty(date: str):
print(f'queryallrecordsbydateproperty: {date}')
try:
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property=head')
html = response.read().decode('utf-8')
@@ -31,6 +35,8 @@ def queryallrecordsbydateproperty(date: str):
print("Error")
def queryallscadarecordsbydate(date: str):
print(f'queryallscadarecordsbydate: {date}')
try:
response = urllib.request.urlopen(f'http://localhost/queryallscadarecordsbydate/?querydate={date}')
html = response.read().decode('utf-8')
@@ -39,6 +45,8 @@ def queryallscadarecordsbydate(date: str):
print("Error")
def queryallschemeallrecords(date: str):
print(f'queryallschemeallrecords: {date}')
try:
response = urllib.request.urlopen(f'http://localhost/queryallschemeallrecords/?schemetype=burst_Analysis&schemename=testSchema&querydate={date}')
html = response.read().decode('utf-8')
@@ -70,7 +78,7 @@ def auto_cache_data():
str_prev_day = prev_day.strftime('%Y-%m-%d')
print(str_prev_day)
query_all_records_by_date_with_type(str_prev_day)
queryallrecordsbydatewithtype(str_prev_day)
queryallrecordsbydateproperty(str_prev_day)
queryallscadarecordsbydate(str_prev_day)
queryallschemeallrecords(str_prev_day)