mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
only restart server if there is an active session (#14885)
This commit is contained in:
@@ -182,7 +182,7 @@ CommandsRegistry.registerCommand({
|
|||||||
for (let editor of editors) {
|
for (let editor of editors) {
|
||||||
if (editor instanceof NotebookInput) {
|
if (editor instanceof NotebookInput) {
|
||||||
let model: INotebookModel = editor.notebookModel;
|
let model: INotebookModel = editor.notebookModel;
|
||||||
if (model.providerId === 'jupyter') {
|
if (model.providerId === 'jupyter' && model.clientSession.isReady) {
|
||||||
// Jupyter server needs to be restarted so that the correct Python installation is used
|
// Jupyter server needs to be restarted so that the correct Python installation is used
|
||||||
if (!jupyterServerRestarted) {
|
if (!jupyterServerRestarted) {
|
||||||
let jupyterNotebookManager: INotebookManager = model.notebookManagers.find(x => x.providerId === 'jupyter');
|
let jupyterNotebookManager: INotebookManager = model.notebookManagers.find(x => x.providerId === 'jupyter');
|
||||||
|
|||||||
Reference in New Issue
Block a user