Skip to content

Commit

Permalink
Rename to sleepOnStartup for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Jun 15, 2023
1 parent f74a47b commit 598f8b6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/jupyter-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"default": false,
"description": "Run <f5> before starting up Jupyter kernel (when supported)"
},
"positron.jupyterAdapter.delayStartup": {
"positron.jupyterAdapter.sleepOnStartup": {
"scope": "window",
"type": "number",
"description": "Sleep for n seconds before starting up Jupyter kernel (when supported)"
Expand Down
8 changes: 4 additions & 4 deletions extensions/jupyter-adapter/src/JupyterKernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,14 @@ export class JupyterKernel extends EventEmitter implements vscode.Disposable {

const config = vscode.workspace.getConfiguration('positron.jupyterAdapter');
const attachOnStartup = config.get('attachOnStartup', false) && this._extra?.attachOnStartup;
const delayStartup = config.get('delayStartup', undefined) && this._extra?.delayStartup;
const sleepOnStartup = config.get('sleepOnStartup', undefined) && this._extra?.sleepOnStartup;

if (attachOnStartup) {
this._extra!.attachOnStartup!.init(args);
}
if (delayStartup) {
const delay = config.get('delayStartup', 0);
this._extra!.delayStartup!.init(args, delay);
if (sleepOnStartup) {
const delay = config.get('sleepOnStartup', 0);
this._extra!.sleepOnStartup!.init(args, delay);
}

const command = args.join(' ');
Expand Down
2 changes: 1 addition & 1 deletion extensions/jupyter-adapter/src/jupyter-adapter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export interface JupyterKernelExtra {
init: (args: Array<String>) => void;
attach: () => Promise<void>;
};
delayStartup?: {
sleepOnStartup?: {
init: (args: Array<String>, delay: number) => void;
};
}
2 changes: 1 addition & 1 deletion extensions/positron-r/src/jupyter-adapter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export interface JupyterKernelExtra {
init: (args: Array<String>) => void;
attach: () => Promise<void>;
};
delayStartup?: {
sleepOnStartup?: {
init: (args: Array<String>, delay: number) => void;
};
}
2 changes: 1 addition & 1 deletion extensions/positron-r/src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export function registerArkKernel(ext: vscode.Extension<any>, context: vscode.Ex

const extra: JupyterKernelExtra = {
attachOnStartup: new ArkAttachOnStartup(),
delayStartup: new ArkDelayStartup(),
sleepOnStartup: new ArkDelayStartup(),
};

// Create an adapter for the kernel to fulfill the LanguageRuntime interface.
Expand Down

0 comments on commit 598f8b6

Please sign in to comment.