Skip to content

Commit

Permalink
Make the /health/ads check more useful
Browse files Browse the repository at this point in the history
  • Loading branch information
kemitche committed Nov 1, 2012
1 parent 9bcf690 commit 152c79c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r2/r2/lib/promote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 152c79c

Please sign in to comment.