Delete ison
This commit is contained in:
parent
e1b434ea95
commit
7087e33a90
1 changed files with 0 additions and 29 deletions
29
ison
29
ison
|
@ -1,29 +0,0 @@
|
|||
#!/Users/sij/miniforge3/envs/sijapi/bin/python
|
||||
|
||||
import requests
|
||||
|
||||
def check_health(url):
|
||||
try:
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
return f"{url} is up"
|
||||
else:
|
||||
return f"{url} returned status code {response.status_code}"
|
||||
except requests.exceptions.RequestException:
|
||||
return f"{url} is down"
|
||||
|
||||
def main():
|
||||
addresses = [
|
||||
"http://localhost:4444/health",
|
||||
"http://100.64.64.20:4444/health",
|
||||
"http://100.64.64.30:4444/health",
|
||||
"http://100.64.64.11:4444/health",
|
||||
"http://100.64.64.15:4444/health"
|
||||
]
|
||||
|
||||
for address in addresses:
|
||||
print(check_health(address))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Loading…
Reference in a new issue