mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
notebook background execution (#8079)
* notebook background execution * code review comments * comments 2 * more logging
This commit is contained in:
@@ -35,7 +35,7 @@ export interface INotebookService {
|
||||
launchNotebook(notebook: string | NotebookInfo): Thenable<azdata.nb.NotebookEditor>;
|
||||
launchNotebookWithContent(title: string, content: string): Thenable<azdata.nb.NotebookEditor>;
|
||||
getNotebook(notebook: string | NotebookInfo): Promise<Notebook>;
|
||||
executeNotebook(notebook: any, env: NodeJS.ProcessEnv): Promise<NotebookExecutionResult>;
|
||||
executeNotebook(notebook: any, env?: NodeJS.ProcessEnv): Promise<NotebookExecutionResult>;
|
||||
}
|
||||
|
||||
export class NotebookService implements INotebookService {
|
||||
@@ -73,7 +73,7 @@ export class NotebookService implements INotebookService {
|
||||
return <Notebook>JSON.parse(await this.platformService.readTextFile(notebookPath));
|
||||
}
|
||||
|
||||
async executeNotebook(notebook: Notebook, env: NodeJS.ProcessEnv): Promise<NotebookExecutionResult> {
|
||||
async executeNotebook(notebook: Notebook, env?: NodeJS.ProcessEnv): Promise<NotebookExecutionResult> {
|
||||
const content = JSON.stringify(notebook, undefined, 4);
|
||||
const fileName = `nb-${getDateTimeString()}.ipynb`;
|
||||
const workingDirectory = this.platformService.storagePath();
|
||||
|
||||
Reference in New Issue
Block a user