mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 09:35:39 -05:00
* Fixed #4206 and #4207 * Check if it makes my PR run tests * Add isReady to JupyterSessionManager
This commit is contained in:
@@ -150,11 +150,16 @@ export class JupyterSessionManager implements nb.SessionManager {
|
||||
}
|
||||
|
||||
public shutdownAll(): Promise<void> {
|
||||
return this._sessionManager.shutdownAll();
|
||||
if (this._isReady) {
|
||||
return this._sessionManager.shutdownAll();
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._sessionManager.dispose();
|
||||
if (this._isReady) {
|
||||
this._sessionManager.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -728,7 +728,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
for (let i = 0; i < this.notebookManagers.length; i++) {
|
||||
if (this.notebookManagers[i].sessionManager && this.notebookManagers[i].sessionManager.specs && this.notebookManagers[i].sessionManager.specs.kernels) {
|
||||
let index = this.notebookManagers[i].sessionManager.specs.kernels.findIndex(kernel => kernel.name === kernelSpec.name);
|
||||
if (index >= 0) {
|
||||
if (index >= 0 && this._clientSessions && this._clientSessions.length > 0) {
|
||||
if (this._activeClientSession) {
|
||||
this._oldClientSession = this._activeClientSession;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user