From 30b6d57f5c9c05e4ef003ec5d5e7504acba4bdcf Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 1 Apr 2015 08:02:56 +0300 Subject: [PATCH] Auto-refresh content --- Application.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Application.hs b/Application.hs index 6341e8f..d926eff 100644 --- a/Application.hs +++ b/Application.hs @@ -170,6 +170,12 @@ makeFoundation useEcho conf = do "master" loadWebsiteContent + -- Temporary workaround to force content updates regularly, until + -- distribution of webhooks is handled via consul + void $ forkIO $ forever $ void $ tryAny $ do + threadDelay $ 1000 * 1000 * 60 * 20 + grRefresh websiteContent' + env <- getEnvironment let runDB' :: (MonadIO m, MonadBaseControl IO m) => SqlPersistT m a -> m a