From 152c79c62c2fa6eed1973570822696714e19f0a0 Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Wed, 31 Oct 2012 09:44:35 -0700 Subject: [PATCH] Make the /health/ads check more useful --- r2/r2/lib/promote.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/promote.py b/r2/r2/lib/promote.py index d88eda02b3..8806dba033 100644 --- a/r2/r2/lib/promote.py +++ b/r2/r2/lib/promote.py @@ -64,7 +64,8 @@ def _mark_promos_updated(): def health_check(): - return NamedGlobals.get(PROMO_HEALTH_KEY, default=0) + """Calculate the number of seconds since promotions were last updated""" + return time.time() - int(NamedGlobals.get(PROMO_HEALTH_KEY, default=0)) @memoize("get_promote_srid")