diff --git a/jupyterhub/handlers/base.py b/jupyterhub/handlers/base.py index 31864e22..2f98856e 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -330,7 +330,7 @@ class BaseHandler(RequestHandler): f = user.spawn(server_name, options) spawner = user.spawners[server_name] - user.proxy_pending = True + spawner._proxy_pending = True @gen.coroutine def finish_user_spawn(f=None): @@ -352,9 +352,9 @@ class BaseHandler(RequestHandler): self.log.error("Stopping user %s to avoid inconsistent state") yield user.stop() else: - user.spawner.add_poll_callback(self.user_stopped, user) + spawner.add_poll_callback(self.user_stopped, user) finally: - user.proxy_pending = False + spawner._proxy_pending = False try: yield gen.with_timeout(timedelta(seconds=self.slow_spawn_timeout), f) diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py index 80e5b3d2..0eb3acc0 100644 --- a/jupyterhub/spawner.py +++ b/jupyterhub/spawner.py @@ -48,6 +48,7 @@ class Spawner(LoggingConfigurable): # private attributes for tracking status _spawn_pending = False _stop_pending = False + _proxy_pending = False _waiting_for_response = False orm_spawner = Any() diff --git a/jupyterhub/user.py b/jupyterhub/user.py index f71b992c..37fc2470 100644 --- a/jupyterhub/user.py +++ b/jupyterhub/user.py @@ -117,10 +117,6 @@ class User(HasTraits): self._user_id = None spawners = None - spawn_pending = False - stop_pending = False - proxy_pending = False - waiting_for_response = False @property def authenticator(self):