summaryrefslogtreecommitdiff
path: root/Assistant/Threads/WebApp.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/WebApp.hs')
-rw-r--r--Assistant/Threads/WebApp.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs
index 171c7fd9c..f0acaeb22 100644
--- a/Assistant/Threads/WebApp.hs
+++ b/Assistant/Threads/WebApp.hs
@@ -145,15 +145,17 @@ getConfigR = defaultLayout $ do
setTitle "configuration"
[whamlet|<a href="@{HomeR}">main|]
-webAppThread :: ThreadState -> DaemonStatusHandle -> TransferQueue -> IO ()
-webAppThread st dstatus transferqueue = do
+webAppThread :: ThreadState -> DaemonStatusHandle -> TransferQueue -> Maybe (IO ()) -> IO ()
+webAppThread st dstatus transferqueue onstartup = do
webapp <- mkWebApp
app <- toWaiAppPlain webapp
app' <- ifM debugEnabled
( return $ httpDebugLogger app
, return app
)
- runWebApp app' $ \port -> runThreadState st $ writeHtmlShim webapp port
+ runWebApp app' $ \port -> do
+ runThreadState st $ writeHtmlShim webapp port
+ maybe noop id onstartup
where
mkWebApp = do
dir <- absPath =<< runThreadState st (fromRepo repoPath)