mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-30 19:54:47 +00:00
revert printf debugging
This commit is contained in:
@@ -211,17 +211,14 @@ startWeb foundation = do
|
|||||||
|
|
||||||
setWebProcessThreadId (asyncThreadId action) foundation
|
setWebProcessThreadId (asyncThreadId action) foundation
|
||||||
void $ waitCatch action
|
void $ waitCatch action
|
||||||
putStrLn @Text "WebServer Killed"
|
|
||||||
shouldRestart <- takeMVar (appShouldRestartWeb foundation)
|
shouldRestart <- takeMVar (appShouldRestartWeb foundation)
|
||||||
when shouldRestart $ do
|
when shouldRestart $ do
|
||||||
putStrLn @Text "Resetting Restart"
|
|
||||||
putMVar (appShouldRestartWeb foundation) False
|
putMVar (appShouldRestartWeb foundation) False
|
||||||
putStrLn @Text "Restarting Web Server"
|
putStrLn @Text "Restarting Web Server"
|
||||||
startWeb' app
|
startWeb' app
|
||||||
|
|
||||||
restartWeb :: RegistryCtx -> IO ()
|
restartWeb :: RegistryCtx -> IO ()
|
||||||
restartWeb foundation = do
|
restartWeb foundation = do
|
||||||
putStrLn @Text "Should restart"
|
|
||||||
void $ swapMVar (appShouldRestartWeb foundation) True
|
void $ swapMVar (appShouldRestartWeb foundation) True
|
||||||
shutdownWeb foundation
|
shutdownWeb foundation
|
||||||
|
|
||||||
@@ -233,9 +230,7 @@ shutdownAll threadIds = do
|
|||||||
-- Careful, you should always spawn this within forkIO so as to avoid accidentally killing the running process
|
-- Careful, you should always spawn this within forkIO so as to avoid accidentally killing the running process
|
||||||
shutdownWeb :: RegistryCtx -> IO ()
|
shutdownWeb :: RegistryCtx -> IO ()
|
||||||
shutdownWeb RegistryCtx{..} = do
|
shutdownWeb RegistryCtx{..} = do
|
||||||
putStrLn @Text "Taking MVar"
|
|
||||||
threadId <- takeMVar appWebServerThreadId
|
threadId <- takeMVar appWebServerThreadId
|
||||||
putStrLn @Text "Killing Thread"
|
|
||||||
killThread threadId
|
killThread threadId
|
||||||
|
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user