fix: remove async from getUptimeFormatted

This commit is contained in:
Marius Begby committed 2023-09-14 14:37:47 +02:00
1 parent 5558c0bca2
commit 4041404f01
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -26,7 +26,7 @@ export async function getPlayerStatistics(client: ExtendedClient): Promise<strin
export async function getSystemStatus(executionId: string, extended: boolean): Promise<string> {
if (!extended) {
const uptimeString: string = await getUptimeFormatted({ executionId });
const uptimeString: string = getUptimeFormatted({ executionId });
const usedMemoryInMB: string = Math.ceil((await osu.mem.info()).usedMemMb).toLocaleString('en-US');
const cpuUsage: number = await osu.cpu.usage();
@@ -35,7 +35,7 @@ export async function getSystemStatus(executionId: string, extended: boolean): P
);
}
const uptimeString: string = await getUptimeFormatted({ executionId });
const uptimeString: string = getUptimeFormatted({ executionId });
const totalMemoryInMb: string = Math.ceil((await osu.mem.info()).totalMemMb).toLocaleString('en-US');
const cpuCores: number = osu.cpu.count();
const platform: string = osu.os.platform();
+1 -1
View File
@@ -2,7 +2,7 @@ import Discord, { Client } from 'discord.js';
import { Logger } from 'pino';
import loggerModule from '../../services/logger';
export const createClient = async ({ executionId }: { executionId: string }) => {
export const createClient = async ({ executionId }: { executionId: string }): Promise<Client> => {
const logger: Logger = loggerModule.child({
module: 'utilFactory',
name: 'createClient',
+1 -1
View File
@@ -4,7 +4,7 @@ import { Logger } from 'pino';
import loggerModule from '../../services/logger';
import { CreatePlayerParams } from '../../types/playerTypes';
export const createPlayer = async ({ client, executionId }: CreatePlayerParams) => {
export const createPlayer = async ({ client, executionId }: CreatePlayerParams): Promise<Player> => {
const logger: Logger = loggerModule.child({
module: 'utilFactory',
name: 'createPlayer',
+1 -1
View File
@@ -2,7 +2,7 @@ import { Logger } from 'pino';
import loggerModule from '../../services/logger';
import { GetUptimeFormattedParams } from '../../types/utilTypes';
export const getUptimeFormatted = async ({ executionId }: GetUptimeFormattedParams) => {
export const getUptimeFormatted = ({ executionId }: GetUptimeFormattedParams): string => {
const logger: Logger = loggerModule.child({
module: 'utilSystem',
name: 'getUptimeFormatted',