refactor: fix remaining lints in backend daemons
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed

This commit is contained in:
Norm 2022-09-10 14:16:17 -04:00
parent 846ca03a7c
commit 4d01ece286
Signed by: 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
*/
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));

View file

@ -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);
});