feat: jwt performance
This commit is contained in:
1 parent
3ec95e4377
commit
c39814047a
9 files changed
+204
-173
No files matched your search
@@ -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