Commit a637c57c by zhaihuitao

update

parent c92c1ded
...@@ -34,8 +34,12 @@ param = { ...@@ -34,8 +34,12 @@ param = {
mysqlCon = MysqlCon(host=host, username=username, password=password, db=db) mysqlCon = MysqlCon(host=host, username=username, password=password, db=db)
r = mysqlCon.get_one(sql=sql) r = mysqlCon.get_one(sql=sql)
count = r[0] if r is None:
count = 0
else:
count = r[0]
# 解决运行警告问题
requests.packages.urllib3.disable_warnings()
p = requests.get(url=URL, params=param, timeout=30, verify=False) p = requests.get(url=URL, params=param, timeout=30, verify=False)
time.sleep(360) time.sleep(360)
...@@ -44,6 +48,7 @@ mysqlCon = MysqlCon(host=host, username=username, password=password, db=db) ...@@ -44,6 +48,7 @@ mysqlCon = MysqlCon(host=host, username=username, password=password, db=db)
r = mysqlCon.get_one(sql=sql) r = mysqlCon.get_one(sql=sql)
num = r[0] num = r[0]
print(count, num) print(count, num)
if count + 1 == num: if count + 1 == num:
print("指标确认正常") print("指标确认正常")
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment