mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 09:59:55 +08:00
feat: jwt performance
This commit is contained in:
@@ -82,6 +82,7 @@ export abstract class ServiceBaseClass {
|
||||
workspace: string,
|
||||
blockId: string
|
||||
): Promise<BlockImplInstance | undefined> {
|
||||
if (!blockId) return undefined;
|
||||
const db = await this.database.getDatabase(workspace);
|
||||
const db_block = await db.get(blockId as 'block');
|
||||
if (db_block.id !== blockId) {
|
||||
|
||||
@@ -19,7 +19,7 @@ const loading = new Set();
|
||||
|
||||
const waitLoading = async (key: string) => {
|
||||
while (loading.has(key)) {
|
||||
await sleep();
|
||||
await sleep(50);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -53,7 +53,6 @@ async function _getBlockDatabase(
|
||||
|
||||
if (!workspaces[workspace]) {
|
||||
loading.add(workspace);
|
||||
|
||||
workspaces[workspace] = await BlockClient.init(workspace, {
|
||||
...options,
|
||||
token: await _getCurrentToken(),
|
||||
|
||||
Reference in New Issue
Block a user