mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-17 12:39:54 +08:00
Merge pull request #5593 from levinxo/master
kill notebook its self when server cull idle kernel (new fix)
This commit is contained in:
commit
42227e99f9
@ -141,6 +141,7 @@ define([
|
||||
this.register_iopub_handler('status', $.proxy(this._handle_status_message, this));
|
||||
this.register_iopub_handler('clear_output', $.proxy(this._handle_clear_output, this));
|
||||
this.register_iopub_handler('execute_input', $.proxy(this._handle_input_message, this));
|
||||
this.register_iopub_handler('shutdown_reply', $.proxy(this._handle_shutdown_message, this));
|
||||
|
||||
for (var i=0; i < output_msg_types.length; i++) {
|
||||
this.register_iopub_handler(output_msg_types[i], $.proxy(this._handle_output_message, this));
|
||||
@ -1212,6 +1213,19 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handle a kernel shutdown message
|
||||
* @function _handle_shutdown_message
|
||||
*/
|
||||
Kernel.prototype._handle_shutdown_message = function (msg) {
|
||||
if (!msg.content.restart) {
|
||||
this.events.trigger('kernel_dead.Kernel', {kernel: this});
|
||||
this._kernel_dead();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Dispatch IOPub messages to respective handlers. Each message
|
||||
* type should have a handler.
|
||||
|
Loading…
Reference in New Issue
Block a user