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