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

tornado 5: PeriodicCallback loop arg will be removed#3034

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
takluyver merged 3 commits intojupyter:masterfromminrk:tornado-5
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from1 commit
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
NextNext commit
tornado 5: PeriodicCallback loop arg will be removed
PCs are always run with the current eventloop,which is what the explicitly passed loop always is for us already
  • Loading branch information
@minrk
minrk committedNov 10, 2017
commit66bb8e612f24fe7573c6331cd2469847cb97b2de
6 changes: 3 additions & 3 deletionsnotebook/base/zmqhandlers.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -158,14 +158,14 @@ def clear_cookie(self, *args, **kwargs):

def open(self, *args, **kwargs):
self.log.debug("Opening websocket %s", self.request.path)

# start the pinging
if self.ping_interval > 0:
loop = ioloop.IOLoop.current()
self.last_ping = loop.time() # Remember time of last ping
self.last_pong = self.last_ping
self.ping_callback = ioloop.PeriodicCallback(
self.send_ping, self.ping_interval, io_loop=loop,
self.send_ping, self.ping_interval,
)
self.ping_callback.start()
return super(WebSocketMixin, self).open(*args, **kwargs)
Expand All@@ -175,7 +175,7 @@ def send_ping(self):
if self.stream.closed() and self.ping_callback is not None:
self.ping_callback.stop()
return

# check for timeout on pong. Make sure that we really have sent a recent ping in
# case the machine with both server and client has been suspended since the last ping.
now = ioloop.IOLoop.current().time()
Expand Down
2 changes: 1 addition & 1 deletionnotebook/services/kernels/kernelmanager.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -386,7 +386,7 @@ def initialize_culler(self):
self.cull_interval, self.cull_interval_default)
self.cull_interval = self.cull_interval_default
self._culler_callback = PeriodicCallback(
self.cull_kernels, 1000*self.cull_interval, loop)
self.cull_kernels, 1000*self.cull_interval)
self.log.info("Culling kernels with idle durations > %s seconds at %s second intervals ...",
self.cull_idle_timeout, self.cull_interval)
if self.cull_busy:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp