mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 05:53:51 -04:00
14 lines
325 B
Python
14 lines
325 B
Python
import os
|
|
|
|
import requests
|
|
from requests.exceptions import RequestException
|
|
|
|
|
|
def is_api_down():
|
|
api_base_url = os.getenv("API_BASE_URL", "http://localhost:6011")
|
|
try:
|
|
response = requests.get(api_base_url, timeout=2)
|
|
return response.status_code != 200
|
|
except RequestException:
|
|
return True
|