mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 14:33:00 +00:00
add_user can be async in Hub.init_users
This commit is contained in:
@@ -543,14 +543,14 @@ class JupyterHub(Application):
|
|||||||
# From this point on, any user changes should be done simultaneously
|
# From this point on, any user changes should be done simultaneously
|
||||||
# to the whitelist set and user db, unless the whitelist is empty (all users allowed).
|
# to the whitelist set and user db, unless the whitelist is empty (all users allowed).
|
||||||
|
|
||||||
db.commit()
|
|
||||||
for user in new_users:
|
|
||||||
self.authenticator.add_user(user)
|
|
||||||
db.commit()
|
|
||||||
|
|
||||||
# load any still-active spawners from JSON
|
# load any still-active spawners from JSON
|
||||||
run_sync = IOLoop().run_sync
|
run_sync = IOLoop().run_sync
|
||||||
|
|
||||||
|
db.commit()
|
||||||
|
for user in new_users:
|
||||||
|
run_sync(lambda : self.authenticator.add_user(user))
|
||||||
|
db.commit()
|
||||||
|
|
||||||
user_summaries = ['']
|
user_summaries = ['']
|
||||||
def _user_summary(user):
|
def _user_summary(user):
|
||||||
parts = ['{0: >8}'.format(user.name)]
|
parts = ['{0: >8}'.format(user.name)]
|
||||||
|
Reference in New Issue
Block a user