mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
Don't log a warning when slow_spawn_timeout is disabled
When using the `KubeSpawner` it is typical to disable the `slow_spawn_timeout` by setting it to 0. `zero-to-jupyterhub-k8s` does this by default [1]. However, this causes an immediate `TimeoutError` which gets logged as a warning like this: >User hub-stress-test-123 is slow to start (timeout=0) This avoids the warning by checking the value and if disabled simply returns without logging the warning. [1] https://github.com/jupyterhub/zero-to-jupyterhub-k8s/commit/b4738edc5 Closes #3126
This commit is contained in:
@@ -977,6 +977,9 @@ class BaseHandler(RequestHandler):
|
|||||||
# waiting_for_response indicates server process has started,
|
# waiting_for_response indicates server process has started,
|
||||||
# but is yet to become responsive.
|
# but is yet to become responsive.
|
||||||
if spawner._spawn_pending and not spawner._waiting_for_response:
|
if spawner._spawn_pending and not spawner._waiting_for_response:
|
||||||
|
# If slow_spawn_timeout is intentionally disabled then we
|
||||||
|
# don't need to log a warning, just return.
|
||||||
|
if self.slow_spawn_timeout > 0:
|
||||||
# still in Spawner.start, which is taking a long time
|
# still in Spawner.start, which is taking a long time
|
||||||
# we shouldn't poll while spawn is incomplete.
|
# we shouldn't poll while spawn is incomplete.
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
|
Reference in New Issue
Block a user