From 9d2f95bb58f856aaf9142426e90e5783c98af8f1 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Mon, 27 Jan 2025 14:51:28 +0000 Subject: Makes doc-comments cleaner/more elegant --- hsm-dummy-fail/Main.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hsm-dummy-fail/Main.hs') diff --git a/hsm-dummy-fail/Main.hs b/hsm-dummy-fail/Main.hs index 785304c..4844f3b 100644 --- a/hsm-dummy-fail/Main.hs +++ b/hsm-dummy-fail/Main.hs @@ -30,15 +30,16 @@ singleError :: (Concurrent :> es, Reader Env :> es) => Stream (Eff es) ByteString singleError = fromEffect $ do - -- Seemingly, the service needs to be alive for a bit for ZMQ comms to - -- kick in. env <- ask @Env + -- The service needs to remain active for a short time to ensure the ZMQ + -- message is sent. Without this delay, the service may exit before + -- the communication occurs, preventing the message from being + -- transmitted. threadDelay $ fromIntegral env.alive return $ message env.name $ Error 0 "Sent from dummy-fail service" --- Dummy fail service: --- Proof of concept. Publishes a single error that can be catched by a --- listening client. +-- Dummy Fail Service: A proof of concept that publishes a single error +-- message, which can be caught by a listening client. main :: IO () main = launch @Env "dummy-fail" withoutInputEcho $ \env logger level -> -- cgit v1.2.1