forked from FoundKeyGang/FoundKey
refactor: fix remaining lints in backend daemons
This commit is contained in:
parent
846ca03a7c
commit
4d01ece286
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ const interval = 10000;
|
|||
* Report queue stats regularly
|
||||
*/
|
||||
export function queueStats(): void {
|
||||
const log = [] as any[];
|
||||
const log: Record<string, Record<string, number>>[] = [];
|
||||
|
||||
ev.on('requestQueueStatsLog', x => {
|
||||
ev.emit(`queueStatsLog:${x.id}`, log.slice(0, x.length || 50));
|
||||
|
|
|
@ -13,7 +13,7 @@ const round = (num: number): number => Math.round(num * 10) / 10;
|
|||
* Report server stats regularly
|
||||
*/
|
||||
export function serverStats(): void {
|
||||
const log = [] as any[];
|
||||
const log: Record<string, Record<string, number> | number>[] = [];
|
||||
|
||||
ev.on('requestServerStatsLog', x => {
|
||||
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
|
||||
|
@ -52,7 +52,7 @@ export function serverStats(): void {
|
|||
|
||||
// CPU STAT
|
||||
function cpuUsage(): Promise<number> {
|
||||
return new Promise((res, rej) => {
|
||||
return new Promise((res) => {
|
||||
osUtils.cpuUsage((cpuUsage) => {
|
||||
res(cpuUsage);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue