mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
This reverts commit 0c8b322
This commit is contained in:
committed by
Vishwas Shashidhar
parent
4e25fddbe6
commit
c895291324
@@ -366,6 +366,18 @@ function createAPI() {
|
||||
throttledSetLocale(locale);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Allows JS to register activeRequests that can be used by electron to
|
||||
* get the active network request from the client
|
||||
*
|
||||
* @param activeRequests
|
||||
*/
|
||||
registerActiveRequests: function (activeRequests) {
|
||||
if (typeof activeRequests === 'function') {
|
||||
local.activeRequests = activeRequests;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// add support for both ssf and SYM_API name-space.
|
||||
@@ -518,10 +530,12 @@ function createAPI() {
|
||||
if (window.name === 'main') {
|
||||
const memory = process.getProcessMemoryInfo();
|
||||
const cpuUsage = process.getCPUUsage();
|
||||
const activeRequests = local.activeRequests();
|
||||
local.ipcRenderer.send(apiName, {
|
||||
cmd: apiCmds.optimizeMemoryConsumption,
|
||||
memory,
|
||||
cpuUsage,
|
||||
activeRequests,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user