mirror of https://github.com/openspug/spug
U 优化站点检测异常信息输出
parent
f084a4dcce
commit
121c605332
|
@ -20,7 +20,7 @@ regex = re.compile(r'Failed to establish a new connection: (.*)\'\)+')
|
||||||
|
|
||||||
def site_check(url, limit):
|
def site_check(url, limit):
|
||||||
try:
|
try:
|
||||||
res = requests.get(url, timeout=10)
|
res = requests.get(url, timeout=30)
|
||||||
if limit:
|
if limit:
|
||||||
duration = int(res.elapsed.total_seconds() * 1000)
|
duration = int(res.elapsed.total_seconds() * 1000)
|
||||||
if duration > int(limit):
|
if duration > int(limit):
|
||||||
|
|
Loading…
Reference in New Issue