From abce15a6b29de8dcb3d56187355425b6bc5b2d30 Mon Sep 17 00:00:00 2001 From: Vignesh Rangaishenvi <5912182+vignesh-mr@users.noreply.github.com> Date: Mon, 10 Aug 2020 15:02:24 -0700 Subject: [PATCH] Add init message when warming up notebook workspace (#139) * Add init message * Address comments --- src/Explorer/Explorer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Explorer/Explorer.ts b/src/Explorer/Explorer.ts index 0d6fb54b9..59fa442de 100644 --- a/src/Explorer/Explorer.ts +++ b/src/Explorer/Explorer.ts @@ -1723,6 +1723,7 @@ export default class Explorer { return; } + let clearMessage; try { const notebookWorkspace = await this.notebookWorkspaceManager.getNotebookWorkspaceAsync( this.databaseAccount().id, @@ -1734,10 +1735,14 @@ export default class Explorer { notebookWorkspace.properties.status && notebookWorkspace.properties.status.toLowerCase() === "stopped" ) { + clearMessage = NotificationConsoleUtils.logConsoleProgress("Initializing notebook workspace"); await this.notebookWorkspaceManager.startNotebookWorkspaceAsync(this.databaseAccount().id, "default"); } } catch (error) { Logger.logError(error, "Explorer/ensureNotebookWorkspaceRunning"); + NotificationConsoleUtils.logConsoleError(`Failed to initialize notebook workspace: ${JSON.stringify(error)}`); + } finally { + clearMessage && clearMessage(); } }