clear outstanding health check on failure
should always be cleared when it completes, whether it was a success or failure
@@ -74,7 +74,9 @@ def at_most_every(_f=None, *, interval=60):
now = time.monotonic()
if now > last_time + interval:
outstanding = asyncio.ensure_future(f(*args, **kwargs))
+ try:
last_result = await outstanding
+ finally:
# complete, clear outstanding future and note the time
outstanding = None
last_time = time.monotonic()
