refactor: fix remaining lints in backend daemons #140

Manually merged
norm merged 1 commit from refactor/backend-stats into main 2022-09-14 14:40:54 +00:00
Owner

Switched from using the 'os-utils' package to 'node-os-utils' since it's
more up to date and uses promises instead of callbacks.

~~Switched from using the 'os-utils' package to 'node-os-utils' since it's more up to date and uses promises instead of callbacks.~~
Johann150 requested changes 2022-09-14 13:14:45 +00:00
@ -1,6 +1,6 @@
import si from 'systeminformation';
import Xev from 'xev';
import * as osUtils from 'os-utils';
import * as osUtils from 'node-os-utils';
Owner

This import breaks the functionality. Use this instead:

import osUtils from 'node-os-utils';
This import breaks the functionality. Use this instead: ```typescript import osUtils from 'node-os-utils'; ```
norm marked this conversation as resolved
@ -59,1 +54,3 @@
});
async function cpuUsage(): Promise<number> {
const cpuUsage = await osUtils.cpu.usage();
return cpuUsage;
Owner

The variable seems unnecessary.

return await osUtils.cpu.usage();
The variable seems unnecessary. ```typescript return await osUtils.cpu.usage(); ```
norm marked this conversation as resolved
norm force-pushed refactor/backend-stats from 23e1037810 to 92c1d63269 2022-09-14 14:13:58 +00:00 Compare
norm force-pushed refactor/backend-stats from 92c1d63269 to 08561fc22e 2022-09-14 14:18:53 +00:00 Compare
norm force-pushed refactor/backend-stats from 08561fc22e to c4131a0666 2022-09-14 14:34:21 +00:00 Compare
Author
Owner

Revering back to the older os-utils package since it seems like the node-os-utils cpu usage function was just returning garbage.

Revering back to the older os-utils package since it seems like the node-os-utils cpu usage function was just returning garbage.
Johann150 approved these changes 2022-09-14 14:39:23 +00:00
norm force-pushed refactor/backend-stats from c4131a0666 to 4d01ece286 2022-09-14 14:40:16 +00:00 Compare
norm manually merged commit 4d01ece286 into main 2022-09-14 14:40:54 +00:00
norm deleted branch refactor/backend-stats 2022-09-14 14:41:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#140
No description provided.