remove unneeded discordAlert from health check

This commit is contained in:
Ben Allfree 2024-09-25 04:34:23 +00:00
parent 54837acc60
commit 57f5535910

View File

@ -8,7 +8,6 @@ import {
DISCORD_HEALTH_CHANNEL_URL, DISCORD_HEALTH_CHANNEL_URL,
LoggerService, LoggerService,
MOTHERSHIP_PORT, MOTHERSHIP_PORT,
discordAlert,
stringify, stringify,
} from '../../../../core' } from '../../../../core'
@ -24,7 +23,6 @@ export const checkHealth = async () => {
info(`Starting`) info(`Starting`)
try {
const _exec = (cmd: string) => const _exec = (cmd: string) =>
execSync(cmd, { shell: '/bin/bash', maxBuffer: 1024 * 1024 * 10 }) execSync(cmd, { shell: '/bin/bash', maxBuffer: 1024 * 1024 * 10 })
.toString() .toString()
@ -110,10 +108,7 @@ export const checkHealth = async () => {
return freeMemoryGB.toFixed(2) // Rounds to 2 decimal places return freeMemoryGB.toFixed(2) // Rounds to 2 decimal places
} }
function splitIntoChunks( function splitIntoChunks(lines: string[], maxChars: number = 2000): string[] {
lines: string[],
maxChars: number = 2000,
): string[] {
const chunks: string[] = [] const chunks: string[] = []
let currentChunk: string = '' let currentChunk: string = ''
@ -189,7 +184,6 @@ export const checkHealth = async () => {
isHealthy: false, isHealthy: false,
url: `http://localhost:${MOTHERSHIP_PORT()}/api/health`, url: `http://localhost:${MOTHERSHIP_PORT()}/api/health`,
}, },
...containers,
] ]
await Promise.all( await Promise.all(
@ -234,7 +228,4 @@ export const checkHealth = async () => {
} }
}), }),
]) ])
} catch (e) {
discordAlert(`${e}`)
}
} }