From 1ab20482ab37d7962c8e69701163270e687df3ca Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Thu, 15 May 2025 23:39:29 -0700 Subject: more snapshot --- u/server/activity/health.ts | 18 ++++++++++-------- u/server/activity/mod.ts | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'u/server/activity') diff --git a/u/server/activity/health.ts b/u/server/activity/health.ts index bf1f52c..7ee6629 100644 --- a/u/server/activity/health.ts +++ b/u/server/activity/health.ts @@ -1,25 +1,27 @@ import { - Either, - getRequiredEnv, - getStdout, + type IEither, type ITraceable, LogLevel, type Mapper, TraceUtil, } from "@emprespresso/pengueno"; -type HealthCheckInput = "healthy?"; -type HealthCheckOutput = "healthy!"; +export enum HealthCheckInput { + CHECK, +} +export enum HealthCheckOutput { + YAASQUEEN, +} -const HealthCheckActivity = ( +export const HealthCheckActivity = ( check: Mapper< ITraceable, - Promise> + Promise> >, ) => (req: ITraceable) => req.bimap(TraceUtil.withFunctionTrace(HealthCheckActivity)) - .flatMap((r) => r.move( "healthy?")) + .flatMap((r) => r.move(HealthCheckInput.CHECK)) .map(check) .map(TraceUtil.promiseify(({ item: health, trace }) => { health.mapBoth((e) => { diff --git a/u/server/activity/mod.ts b/u/server/activity/mod.ts index 6908c26..9d05d3c 100644 --- a/u/server/activity/mod.ts +++ b/u/server/activity/mod.ts @@ -6,3 +6,5 @@ export class r200 extends Response { export interface IActivity extends RequestFilter { } + +export * from "./health.ts"; -- cgit v1.2.3-70-g09d2