Skip to content

Commit 47a5993

Browse files
Make clearCacheInDatabase not take a cancellation token
1 parent 6b0f7e8 commit 47a5993

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

extensions/ql-vscode/src/databases/local-databases-ui.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,20 +660,18 @@ export class DatabaseUI extends DisposableObject {
660660

661661
private async handleClearCache(): Promise<void> {
662662
return withProgress(
663-
async (_progress, token) => {
663+
async () => {
664664
if (
665665
this.queryServer !== undefined &&
666666
this.databaseManager.currentDatabaseItem !== undefined
667667
) {
668668
await this.queryServer.clearCacheInDatabase(
669669
this.databaseManager.currentDatabaseItem,
670-
token,
671670
);
672671
}
673672
},
674673
{
675674
title: "Clearing cache",
676-
cancellable: true,
677675
},
678676
);
679677
}

extensions/ql-vscode/src/query-server/query-runner.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,7 @@ export class QueryRunner {
107107
this.qs.onDidStartQueryServer(callBack);
108108
}
109109

110-
async clearCacheInDatabase(
111-
dbItem: DatabaseItem,
112-
token: CancellationToken,
113-
): Promise<void> {
110+
async clearCacheInDatabase(dbItem: DatabaseItem): Promise<void> {
114111
if (dbItem.contents === undefined) {
115112
throw new Error("Can't clear the cache in an invalid database.");
116113
}
@@ -120,7 +117,7 @@ export class QueryRunner {
120117
dryRun: false,
121118
db,
122119
};
123-
await this.qs.sendRequest(clearCache, params, token);
120+
await this.qs.sendRequest(clearCache, params);
124121
}
125122

126123
async trimCacheInDatabase(

0 commit comments

Comments
 (0)