mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
delete notebook mapping in shutdown_kernel
This commit is contained in:
parent
844758cca3
commit
05ead0496b
@ -76,7 +76,7 @@ class MappingKernelManager(MultiKernelManager):
|
||||
self.remove_kernel(kernel_id, now=True)
|
||||
|
||||
def start_kernel(self, notebook_id=None, **kwargs):
|
||||
"""Start a kernel for a notebok an return its kernel_id.
|
||||
"""Start a kernel for a notebook an return its kernel_id.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@ -102,6 +102,11 @@ class MappingKernelManager(MultiKernelManager):
|
||||
|
||||
return kernel_id
|
||||
|
||||
def shutdown_kernel(self, kernel_id, now=False):
|
||||
"""Shutdown a kernel by kernel_id"""
|
||||
super(MappingKernelManager, self).shutdown_kernel(kernel_id, now=now)
|
||||
self.delete_mapping_for_kernel(kernel_id)
|
||||
|
||||
# override _check_kernel_id to raise 404 instead of KeyError
|
||||
def _check_kernel_id(self, kernel_id):
|
||||
"""Check a that a kernel_id exists and raise 404 if not."""
|
||||
|
Loading…
Reference in New Issue
Block a user