healthchecks_healthchecks/templates/front/snippets/python_requests.txt
2020-07-17 17:21:10 +03:00

9 lines
196 B
Plaintext

# Using the requests library:
import requests
try:
requests.get("PING_URL", timeout=10)
except requests.RequestException as e:
# Log ping failure here...
print("Ping failed: %s" % e)