refactor: fix remaining lints in backend daemons

This commit is contained in:
Norm 2022-09-10 14:16:17 -04:00
parent 846ca03a7c
commit 4d01ece286
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ const interval = 10000;
* Report queue stats regularly * Report queue stats regularly
*/ */
export function queueStats(): void { export function queueStats(): void {
const log = [] as any[]; const log: Record<string, Record<string, number>>[] = [];
ev.on('requestQueueStatsLog', x => { ev.on('requestQueueStatsLog', x => {
ev.emit(`queueStatsLog:${x.id}`, log.slice(0, x.length || 50)); ev.emit(`queueStatsLog:${x.id}`, log.slice(0, x.length || 50));

View file

@ -13,7 +13,7 @@ const round = (num: number): number => Math.round(num * 10) / 10;
* Report server stats regularly * Report server stats regularly
*/ */
export function serverStats(): void { export function serverStats(): void {
const log = [] as any[]; const log: Record<string, Record<string, number> | number>[] = [];
ev.on('requestServerStatsLog', x => { ev.on('requestServerStatsLog', x => {
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50)); ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
@ -52,7 +52,7 @@ export function serverStats(): void {
// CPU STAT // CPU STAT
function cpuUsage(): Promise<number> { function cpuUsage(): Promise<number> {
return new Promise((res, rej) => { return new Promise((res) => {
osUtils.cpuUsage((cpuUsage) => { osUtils.cpuUsage((cpuUsage) => {
res(cpuUsage); res(cpuUsage);
}); });