webapp: Now allows restarting any threads that crash.

This commit is contained in:
Joey Hess 2013-01-26 17:09:33 +11:00
parent 07717a9b2b
commit 76ddf9b6d3
30 changed files with 124 additions and 61 deletions

View file

@ -38,9 +38,6 @@ import Yesod.Static
import Network.Socket (SockAddr)
import Data.Text (pack, unpack)
thisThread :: String
thisThread = "WebApp"
mkYesodDispatch "WebApp" $(parseRoutesFile "Assistant/WebApp/routes")
type Url = String
@ -76,7 +73,7 @@ webAppThread assistantdata urlrenderer noannex postfirstrun onstartup = thread $
urlfile <- runThreadState st $ fromRepo gitAnnexUrlFile
go addr webapp htmlshim (Just urlfile)
where
thread = NamedThread thisThread
thread = namedThread "WebApp"
getreldir
| noannex = return Nothing
| otherwise = Just <$>