Make clearCacheInDatabase not take a cancellation token
This commit is contained in:
@@ -660,20 +660,18 @@ export class DatabaseUI extends DisposableObject {
|
||||
|
||||
private async handleClearCache(): Promise<void> {
|
||||
return withProgress(
|
||||
async (_progress, token) => {
|
||||
async () => {
|
||||
if (
|
||||
this.queryServer !== undefined &&
|
||||
this.databaseManager.currentDatabaseItem !== undefined
|
||||
) {
|
||||
await this.queryServer.clearCacheInDatabase(
|
||||
this.databaseManager.currentDatabaseItem,
|
||||
token,
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "Clearing cache",
|
||||
cancellable: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -107,10 +107,7 @@ export class QueryRunner {
|
||||
this.qs.onDidStartQueryServer(callBack);
|
||||
}
|
||||
|
||||
async clearCacheInDatabase(
|
||||
dbItem: DatabaseItem,
|
||||
token: CancellationToken,
|
||||
): Promise<void> {
|
||||
async clearCacheInDatabase(dbItem: DatabaseItem): Promise<void> {
|
||||
if (dbItem.contents === undefined) {
|
||||
throw new Error("Can't clear the cache in an invalid database.");
|
||||
}
|
||||
@@ -120,7 +117,7 @@ export class QueryRunner {
|
||||
dryRun: false,
|
||||
db,
|
||||
};
|
||||
await this.qs.sendRequest(clearCache, params, token);
|
||||
await this.qs.sendRequest(clearCache, params);
|
||||
}
|
||||
|
||||
async trimCacheInDatabase(
|
||||
|
||||
Reference in New Issue
Block a user