Skip to content

Commit 28bf345

Browse files
Make trim cache not cancellable
1 parent e23d4a9 commit 28bf345

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
@@ -678,20 +678,18 @@ export class DatabaseUI extends DisposableObject {
678678

679679
private async handleTrimCache(): Promise<void> {
680680
return withProgress(
681-
async (_progress, token) => {
681+
async () => {
682682
if (
683683
this.queryServer !== undefined &&
684684
this.databaseManager.currentDatabaseItem !== undefined
685685
) {
686686
await this.queryServer.trimCacheInDatabase(
687687
this.databaseManager.currentDatabaseItem,
688-
token,
689688
);
690689
}
691690
},
692691
{
693692
title: "Trimming cache",
694-
cancellable: true,
695693
},
696694
);
697695
}

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,7 @@ export class QueryRunner {
112112
await this.qs.sendRequest(clearCache, params);
113113
}
114114

115-
async trimCacheInDatabase(
116-
dbItem: DatabaseItem,
117-
token: CancellationToken,
118-
): Promise<void> {
115+
async trimCacheInDatabase(dbItem: DatabaseItem): Promise<void> {
119116
if (dbItem.contents === undefined) {
120117
throw new Error("Can't trim the cache in an invalid database.");
121118
}
@@ -124,7 +121,7 @@ export class QueryRunner {
124121
const params: TrimCacheParams = {
125122
db,
126123
};
127-
await this.qs.sendRequest(trimCache, params, token);
124+
await this.qs.sendRequest(trimCache, params);
128125
}
129126

130127
public async compileAndRunQueryAgainstDatabaseCore(

0 commit comments

Comments
 (0)