视图过滤

This commit is contained in:
wuaho 2021-08-17 15:37:07 +08:00
parent 8e003a4137
commit 28a1b31523

View File

@ -21,11 +21,11 @@ df = pd.read_json(server_list_url)
df = df[~df['hostname'].isin(['119.3.89.14', '119.3.105.109'])]
serverid = tuple((str(i) for i in df['serverid'].to_list()))
if os.path.exists(svrid_file):
with open(svrid_file, 'r') as f:
old_svrid = json.load(f)
if set(old_svrid) == set(serverid):
exit(0)
# if os.path.exists(svrid_file):
# with open(svrid_file, 'r') as f:
# old_svrid = json.load(f)
# if set(old_svrid) == set(serverid):
# exit(0)
sql = f"""drop table if exists {db}.event_view"""
res1 = client.execute(sql)