Skip to content

Commit

Permalink
Fix interrupting a kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Oct 30, 2018
1 parent 5765854 commit 1dfc5d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion notebook/services/kernels/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class KernelActionHandler(APIHandler):
def post(self, kernel_id, action):
km = self.kernel_manager
if action == 'interrupt':
km.interrupt_kernel(kernel_id)
km.get_kernel(kernel_id).interrupt()
self.set_status(204)
if action == 'restart':

Expand Down
3 changes: 3 additions & 0 deletions notebook/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def shutdown(self, now=False):
self.manager.cleanup()
self.stop_buffering()

def interrupt(self):
self.manager.interrupt()

def _handle_kernel_restarted(self):
self.manager = self.restarter.kernel_manager
# TODO: connection_info
Expand Down

0 comments on commit 1dfc5d4

Please sign in to comment.