chore: Some fixes

This commit is contained in:
BluJ
2023-03-06 14:11:19 -07:00
parent f74be4ec7d
commit 40c75cfcb2
8 changed files with 50 additions and 50 deletions

View File

@@ -3,7 +3,7 @@ import { object, string } from "ts-matches";
export type HealthCheck = (
effects: Types.Effects,
dateMs: number,
dateMs: number
) => Promise<HealthResult>;
export type HealthResult =
| { success: string }
@@ -23,7 +23,7 @@ function safelyStringify(e: unknown) {
}
async function timeoutHealth(
effects: Types.Effects,
timeMs: number,
timeMs: number
): Promise<HealthResult> {
await effects.sleep(timeMs);
return { failure: "Timed out " };
@@ -39,7 +39,7 @@ async function timeoutHealth(
export default function healthRunner(
name: string,
fn: HealthCheck,
{ defaultIntervalS = 60 } = {},
{ defaultIntervalS = 60 } = {}
) {
return {
create(effects: Types.Effects, defaultIntervalCreatedS = defaultIntervalS) {