summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/health.ts13
1 files changed, 5 insertions, 8 deletions
diff --git a/server/health.ts b/server/health.ts
index 1acc074..8fbc69d 100644
--- a/server/health.ts
+++ b/server/health.ts
@@ -17,12 +17,9 @@ export const healthCheck: HealthChecker = (
.bimap(TraceUtil.withFunctionTrace(healthCheck))
.move(getRequiredEnv("LAMINAR_HOST"))
// ensure LAMINAR_HOST is propagated to getStdout for other procedures
- .map((e) => e.get().moveRight(["laminarc", "show-jobs"]))
- .map((i) =>
- i
- .get()
- .mapRight(i.move.apply)
- .flatMapAsync(getStdout.apply)
- .then((gotJobs) => gotJobs.moveRight(HealthCheckOutput.YAASSSLAYQUEEN)),
- )
+ .map((tEitherEnv) => tEitherEnv.get()
+ .flatMapAsync((_hasEnv) =>
+ getStdout(tEitherEnv.move(["laminarc", "show-jobs"]))
+ ))
+ .map(TraceUtil.promiseify((stdout) => stdout.get().moveRight(HealthCheckOutput.YAASSSLAYQUEEN)))
.get();