|
@@ -26,7 +26,7 @@ import {
|
|
|
} from './comm';
|
|
|
|
|
|
import {
|
|
|
- Kernel, log
|
|
|
+ Kernel
|
|
|
} from './kernel';
|
|
|
|
|
|
import {
|
|
@@ -285,7 +285,6 @@ class DefaultKernel implements Kernel.IKernel {
|
|
|
if (msgType === 'status') {
|
|
|
msgType += ' ' + (msg.content as any).execution_state;
|
|
|
}
|
|
|
- log(`JS KERNEL SENT MESSAGE: K${this.id.slice(0, 6)} M${msg.header.msg_id.slice(0, 6)} ${msgType}`);
|
|
|
this._ws.send(serialize.serialize(msg));
|
|
|
}
|
|
|
this._anyMessage.emit({msg, direction: 'send'});
|
|
@@ -757,7 +756,6 @@ class DefaultKernel implements Kernel.IKernel {
|
|
|
this._ws.onclose = this._noOp;
|
|
|
this._ws.onerror = this._noOp;
|
|
|
this._ws.onmessage = this._noOp;
|
|
|
- log('closing ws connection: ' + this.id.slice(0, 6));
|
|
|
this._ws.close();
|
|
|
this._ws = null;
|
|
|
}
|
|
@@ -973,8 +971,6 @@ class DefaultKernel implements Kernel.IKernel {
|
|
|
* Handle a websocket message, validating and routing appropriately.
|
|
|
*/
|
|
|
private _onWSMessage = (evt: MessageEvent) => {
|
|
|
- console.log();
|
|
|
- console.log('IMMEDIATE RECEIVE', evt.data);
|
|
|
if (this._wsStopped) {
|
|
|
// If the socket is being closed, ignore any messages
|
|
|
return;
|
|
@@ -991,16 +987,6 @@ class DefaultKernel implements Kernel.IKernel {
|
|
|
throw error;
|
|
|
}
|
|
|
|
|
|
- let parentId = '';
|
|
|
- if ((msg.parent_header as any).msg_id) {
|
|
|
- parentId = 'P' + (msg.parent_header as any).msg_id.slice(0, 6) + ' ';
|
|
|
- }
|
|
|
- let msgType = msg.header.msg_type;
|
|
|
- if (msgType === 'status') {
|
|
|
- msgType += ' ' + (msg.content as any).execution_state;
|
|
|
- }
|
|
|
- log(`JS KERNEL RECEIVED MESSAGE: K${this.id.slice(0, 6)} C${this.clientId.slice(0, 6)} KS${this._kernelSession.slice(0, 6)} MS${msg.header.session.slice(0, 6)} ${parentId}M${msg.header.msg_id.slice(0, 6)} ${msgType} `);
|
|
|
-
|
|
|
// Update the current kernel session id
|
|
|
this._kernelSession = msg.header.session;
|
|
|
|
|
@@ -1090,7 +1076,6 @@ class DefaultKernel implements Kernel.IKernel {
|
|
|
if (this._wsStopped || !this._ws) {
|
|
|
return;
|
|
|
}
|
|
|
- log('WS Closed');
|
|
|
// Clear the websocket event handlers and the socket itself.
|
|
|
this._ws.onclose = this._noOp;
|
|
|
this._ws.onerror = this._noOp;
|