We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents adf2bb4 + 8c3bd51 commit 02b779eCopy full SHA for 02b779e
binderhub/health.py
@@ -74,10 +74,12 @@ async def wrapper(*args, **kwargs):
74
now = time.monotonic()
75
if now > last_time + interval:
76
outstanding = asyncio.ensure_future(f(*args, **kwargs))
77
- last_result = await outstanding
78
- # complete, clear outstanding future and note the time
79
- outstanding = None
80
- last_time = time.monotonic()
+ try:
+ last_result = await outstanding
+ finally:
+ # complete, clear outstanding future and note the time
81
+ outstanding = None
82
+ last_time = time.monotonic()
83
return last_result
84
85
return wrapper
0 commit comments