Skip to content

Commit 3f7b7af

Browse files
committed
update script
1 parent 8a87e95 commit 3f7b7af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

monitor/src/index.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ def check_site(url, metric):
5151

5252
if STAT != 501 and STAT ==1:
5353
print('Success!')
54-
print(response.status_code)
54+
print(response.elapsed.total_seconds())
5555
STAT = response.status_code
5656

5757
return STAT
5858

5959
def run_thread(site):
6060
r = check_site(site,metricname)
61+
if r == 501:
62+
r = check_site(site,metricname)
6163
if r == 200 or r == 304 or r == 400:
6264
print("Site %s is up" %site)
6365
write_metric(200, metricname, site)

0 commit comments

Comments
 (0)