refactor: await native operations across the bridge lifecycle

This commit is contained in:
手瓜一十雪 committed 2026-10-18 13:19:21 +08:00
1 parent 1faa6c58fa
commit 9b165a8971
24 files changed
+241 -177

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ async function main() {
perUinEnabled: runtimeConfig.logPerUin ?? DEFAULT_LOG_PER_UIN,
});
log.info('SnowLuma starting');
logRuntimeIntegrity(getRuntimeIntegrity());
logRuntimeIntegrity(await getRuntimeIntegrity());
const stopNativeStageSync = startNativeStageSync({
version: APP_VERSION,
dataDir: 'data',
+2 -2
View File
@@ -1364,7 +1364,7 @@ export async function initWebUI(
return usage;
}
app.get('/api/system', (c) => {
app.get('/api/system', async (c) => {
const cpus = os.cpus();
const usage = sampleCpuLoad();
const totalMem = os.totalmem();
@@ -1397,7 +1397,7 @@ export async function initWebUI(
},
runtime: {
pid: process.pid,
lowIntegrity: hasLowProcessIntegrity(getRuntimeIntegrity()),
lowIntegrity: hasLowProcessIntegrity(await getRuntimeIntegrity()),
rss: runtimeMemory.rss,
heapTotal: runtimeMemory.heapTotal,
heapUsed: runtimeMemory.heapUsed,