mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
chore: Update and fix the things
This commit is contained in:
@@ -40,19 +40,21 @@ export function healthCheck(o: {
|
||||
const { status, message } = await o.fn(overlay)
|
||||
await o.effects.setHealth({
|
||||
name: o.name,
|
||||
status,
|
||||
message,
|
||||
id: o.name,
|
||||
result: status,
|
||||
message: message || "",
|
||||
})
|
||||
currentValue.hadSuccess = true
|
||||
currentValue.lastResult = "passing"
|
||||
currentValue.lastResult = "success"
|
||||
await triggerFirstSuccess().catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
} catch (e) {
|
||||
await o.effects.setHealth({
|
||||
name: o.name,
|
||||
status: "failure",
|
||||
message: asMessage(e),
|
||||
id: o.name,
|
||||
result: "failure",
|
||||
message: asMessage(e) || "",
|
||||
})
|
||||
currentValue.lastResult = "failure"
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export async function checkPortListening(
|
||||
port,
|
||||
)
|
||||
if (hasAddress) {
|
||||
return { status: "passing", message: options.successMessage }
|
||||
return { status: "success", message: options.successMessage }
|
||||
}
|
||||
return {
|
||||
status: "failure",
|
||||
|
||||
@@ -22,7 +22,7 @@ export const checkWebUrl = async (
|
||||
.then(
|
||||
(x) =>
|
||||
({
|
||||
status: "passing",
|
||||
status: "success",
|
||||
message: successMessage,
|
||||
}) as const,
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ export const runHealthScript = async (
|
||||
throw { status: "failure", message: errorMessage } as CheckResult
|
||||
})
|
||||
return {
|
||||
status: "passing",
|
||||
status: "success",
|
||||
message: message(res.stdout.toString()),
|
||||
} as CheckResult
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user