From 466203d866ba92a2ee6fed8a01dcf1e610e6e896 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 21 Apr 2020 10:51:45 +0200 Subject: [PATCH] fix(health): more generous healthchecks --- src/Application.hs | 2 +- src/Model/Types/Health.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application.hs b/src/Application.hs index 69c254e9c..fa6992621 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -502,7 +502,7 @@ appMain = runResourceT $ do where go :: Maybe (Set (UTCTime, HealthReport)) -> m' a go pResults = do - let delay = floor $ wInterval % 2 + let delay = floor $ wInterval % 4 d <- liftIO $ newDelay delay $logDebugS "Notify" $ "Waiting up to " <> tshow delay <> "µs..." diff --git a/src/Model/Types/Health.hs b/src/Model/Types/Health.hs index 89de617ab..af2a14147 100644 --- a/src/Model/Types/Health.hs +++ b/src/Model/Types/Health.hs @@ -90,5 +90,5 @@ healthReportStatus = \case HealthSMTPConnect (Just False) -> HealthFailure HealthWidgetMemcached (Just False) -> HealthFailure -- TODO: investigate this failure mode; do we just handle it gracefully? HealthActiveJobExecutors (Just prop ) - | prop < 1 -> HealthFailure + | prop <= 0 -> HealthFailure _other -> maxBound -- Minimum badness