Remove un-use resource checking to free ram on windows - monitor extension (#1241)

Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
hiento09 2023-12-28 15:34:11 +07:00 committed by GitHub
parent 7feaf9694d
commit cfbc5674fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -272,11 +272,11 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise<any> {
function getResourcesInfo(): Promise<ResourcesInfo> { function getResourcesInfo(): Promise<ResourcesInfo> {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
const cpu = await si.cpu(); const cpu = await si.cpu();
const mem = await si.mem(); // const mem = await si.mem();
const response = { const response: ResourcesInfo = {
numCpuPhysicalCore: cpu.physicalCores, numCpuPhysicalCore: cpu.physicalCores,
memAvailable: mem.available, memAvailable: 0,
}; };
resolve(response); resolve(response);
}); });

View File

@ -4,11 +4,11 @@ const getResourcesInfo = async () =>
new Promise(async (resolve) => { new Promise(async (resolve) => {
const cpu = await si.cpu(); const cpu = await si.cpu();
const mem = await si.mem(); const mem = await si.mem();
const gpu = await si.graphics(); // const gpu = await si.graphics();
const response = { const response = {
cpu, cpu,
mem, mem,
gpu, // gpu,
}; };
resolve(response); resolve(response);
}); });