fix memory. Squashed commit of the following:
commit 1c24e48f2528238aeac417866ccec9ee3deced5f Author: fyears <1142836+fyears@users.noreply.github.com> Date: Fri Mar 25 02:08:05 2022 +0800 just some trying
This commit is contained in:
@@ -196,6 +196,26 @@ export const prepareDBs = async (vaultRandomID: string) => {
|
||||
return db;
|
||||
};
|
||||
|
||||
export const dropDBs = async (db: InternalDBs) => {
|
||||
const a1 = localforage.dropInstance({
|
||||
name: DEFAULT_DB_NAME,
|
||||
storeName: DEFAULT_TBL_VERSION,
|
||||
});
|
||||
const a2 = localforage.dropInstance({
|
||||
name: DEFAULT_DB_NAME,
|
||||
storeName: DEFAULT_TBL_DELETE_HISTORY,
|
||||
});
|
||||
const a3 = localforage.dropInstance({
|
||||
name: DEFAULT_DB_NAME,
|
||||
storeName: DEFAULT_TBL_SYNC_MAPPING,
|
||||
});
|
||||
const a4 = localforage.dropInstance({
|
||||
name: DEFAULT_DB_NAME,
|
||||
storeName: DEFAULT_SYNC_PLANS_HISTORY,
|
||||
});
|
||||
await Promise.all([a1, a2, a3, a4]);
|
||||
};
|
||||
|
||||
export const destroyDBs = async () => {
|
||||
// await localforage.dropInstance({
|
||||
// name: DEFAULT_DB_NAME,
|
||||
|
||||
Reference in New Issue
Block a user