diff --git a/horde/apis/v2/base.py b/horde/apis/v2/base.py index d99cc763..a5590812 100644 --- a/horde/apis/v2/base.py +++ b/horde/apis/v2/base.py @@ -2644,13 +2644,17 @@ class Heartbeat(Resource): def get(self): """If this loads, this node is available Includes some other metrics to gauge the health of this node""" - db_conn = True + health = 'OK' + db_conn = True try: db.session.execute(text("SELECT 1")) except Exception: db_conn = False + health = 'DOWN' + if waitress_metrics.queue > 0: + health = 'OVERLOADED' return { - "message": "OK", + "message": health, "version": HORDE_VERSION, "queue": waitress_metrics.queue, "threads": waitress_metrics.threads, diff --git a/horde/consts.py b/horde/consts.py index a4383410..0af26183 100644 --- a/horde/consts.py +++ b/horde/consts.py @@ -1,4 +1,4 @@ -HORDE_VERSION = "4.38.0" +HORDE_VERSION = "4.38.1" WHITELISTED_SERVICE_IPS = { "212.227.227.178", # Turing Bot