refactor: await native operations across the bridge lifecycle
This commit is contained in:
1 parent
1faa6c58fa
commit
9b165a8971
24 files changed
+241
-177
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { createLogger } from '@snowluma/common/logger';
|
||||
import { isQqProcessName, probeDbLock } from './db-lock';
|
||||
import { isQqProcessName, getDatabaseHolders } from './database-holders';
|
||||
import { readLocalAccounts, type LocalAccount } from './login-db';
|
||||
import { loginDbPaths, ntMsgDbPath, qqDataRoots, qqDataRootsForPid } from './paths';
|
||||
|
||||
@@ -39,8 +39,8 @@ export async function detectAccountLogins(
|
||||
}
|
||||
|
||||
for (const account of report.accounts) {
|
||||
const holder = probeDbLock(ntMsgDbPath(root, account)).find((candidate) =>
|
||||
isQqProcessName(candidate.name),
|
||||
const holder = (await getDatabaseHolders(ntMsgDbPath(root, account))).find(
|
||||
(candidate) => isQqProcessName(candidate.name),
|
||||
);
|
||||
states.push({ ...account, pid: holder?.pid ?? null });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user