Skip to content

Commit

Permalink
Merge pull request #386 from kevin-bates/fix-list-sessions
Browse files Browse the repository at this point in the history
Apply missing ensure_async to root session handler methods
  • Loading branch information
Zsailer authored Jan 14, 2021
2 parents 04eba34 + 792d659 commit e93a546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyter_server/services/sessions/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SessionRootHandler(APIHandler):
async def get(self):
# Return a list of running sessions
sm = self.session_manager
sessions = await sm.list_sessions()
sessions = await ensure_async(sm.list_sessions())
self.finish(json.dumps(sessions, default=date_default))

@web.authenticated
Expand Down Expand Up @@ -59,7 +59,7 @@ async def post(self):
self.log.debug("No kernel specified, using default kernel")
kernel_name = None

exists = await sm.session_exists(path=path)
exists = await ensure_async(sm.session_exists(path=path))
if exists:
model = await sm.get_session(path=path)
else:
Expand Down

0 comments on commit e93a546

Please sign in to comment.