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
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user