mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 02:58:31 -05:00
Fix a few notebook promises (#9315)
* Fix a few notebook promises * Add a _ before sessionDetails * Change to onUnexpectedError
This commit is contained in:
@@ -34,6 +34,7 @@ import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { attachButtonStyler } from 'sql/platform/theme/common/styler';
|
||||
import { Taskbar } from 'sql/base/browser/ui/taskbar/taskbar';
|
||||
import { find, fill } from 'vs/base/common/arrays';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
export const NOTEBOOKSVIEW_SELECTOR: string = 'notebooksview-component';
|
||||
@@ -407,14 +408,14 @@ export class NotebooksViewComponent extends JobManagementView implements OnInit,
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.openLastNRun(targetNotebook, barId, 5);
|
||||
this.openLastNRun(targetNotebook, barId, 5).catch(onUnexpectedError);
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// cache the dataview for future use
|
||||
this._notebookCacheObject.dataView = this.dataView;
|
||||
this.filterValueMap['start'] = [[], this.dataView.getItems()];
|
||||
this.loadJobHistories();
|
||||
this.loadJobHistories().catch(onUnexpectedError);
|
||||
}
|
||||
|
||||
private highlightErrorRows(e) {
|
||||
@@ -582,7 +583,7 @@ export class NotebooksViewComponent extends JobManagementView implements OnInit,
|
||||
this.rowDetail.applyTemplateNewLineHeight(item, true);
|
||||
}
|
||||
|
||||
private async loadJobHistories() {
|
||||
private async loadJobHistories(): Promise<void> {
|
||||
if (this.notebooks) {
|
||||
let ownerUri: string = this._commonService.connectionManagementService.connectionInfo.ownerUri;
|
||||
let separatedJobs = this.separateFailingJobs();
|
||||
@@ -590,7 +591,7 @@ export class NotebooksViewComponent extends JobManagementView implements OnInit,
|
||||
// so they can be expanded quicker
|
||||
let failing = separatedJobs[0];
|
||||
let passing = separatedJobs[1];
|
||||
Promise.all([this.curateJobHistory(failing, ownerUri), this.curateJobHistory(passing, ownerUri)]);
|
||||
await Promise.all([this.curateJobHistory(failing, ownerUri), this.curateJobHistory(passing, ownerUri)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user