Update jupyterhub/handlers/base.py

Ah makes sense, I was wandering why the tests fail.

Co-authored-by: Georgiana Elena <georgiana.dolocan@gmail.com>
This commit is contained in:
yhal-nesi
2020-08-22 08:47:15 +12:00
committed by GitHub
parent 60ee2bfc35
commit f988a4939e

View File

@@ -946,8 +946,8 @@ class BaseHandler(RequestHandler):
return return
# spawn failed, increment count and abort if limit reached # spawn failed, increment count and abort if limit reached
SERVER_SPAWN_DURATION_SECONDS.labels( SERVER_SPAWN_DURATION_SECONDS.labels(
status=ServerSpawnStatus.failure status=ServerSpawnStatus.failure
).observe(time.perf_counter() - spawn_start_time) ).observe(time.perf_counter() - spawn_start_time)
self.settings.setdefault('failure_count', 0) self.settings.setdefault('failure_count', 0)
self.settings['failure_count'] += 1 self.settings['failure_count'] += 1
failure_count = self.settings['failure_count'] failure_count = self.settings['failure_count']