Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bind the HTTPServer in start#6061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
blink1073 merged 1 commit intojupyter:masterfromminrk:bind-in-start
May 13, 2021
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Bind the HTTPServer in start
Binding sockets hooks them up to the running eventloop, which we should try to avoid in initializein case any other stages may configure the event loop policy
  • Loading branch information
@minrk
minrk committedMay 13, 2021
commit36c6b40f57f97af2a2fc337011280fc1223adbb8
12 changes: 6 additions & 6 deletionsnotebook/notebookapp.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1792,12 +1792,6 @@ def init_webapp(self):
max_body_size=self.max_body_size,
max_buffer_size=self.max_buffer_size)

success = self._bind_http_server()
if not success:
self.log.critical(_('ERROR: the notebook server could not be started because '
'no available port could be found.'))
self.exit(1)

def _bind_http_server(self):
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()

Expand DownExpand Up@@ -2297,6 +2291,12 @@ def start(self):
self.log.critical(_("Running as root is not recommended. Use --allow-root to bypass."))
self.exit(1)

success = self._bind_http_server()
if not success:
self.log.critical(_('ERROR: the notebook server could not be started because '
'no available port could be found.'))
self.exit(1)

info = self.log.info
for line in self.notebook_info(kernel_count=False).split("\n"):
info(line)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp