move user.proxy_pending to Spawner._proxy_pending

This commit is contained in:
Min RK
2017-07-24 15:22:36 +02:00
parent f7bf2b0ba6
commit 9a555d8a6e
3 changed files with 4 additions and 7 deletions

View File

@@ -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)

View File

@@ -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()

View File

@@ -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):