summaryrefslogtreecommitdiffhomepage
path: root/Role/Watcher.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-29 15:13:44 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-29 15:13:44 -0400
commit37eb3fc850cb28bcf72d971b4fff99902bbce811 (patch)
tree7271540eaff79baa3a2b5ccbb089a282d28e7f02 /Role/Watcher.hs
parenta61df1522ddf8a36839cf1180d3b16e354459e9a (diff)
downloaddebug-me-37eb3fc850cb28bcf72d971b4fff99902bbce811.tar.gz
use developer control window to tell when write access is granted
Diffstat (limited to 'Role/Watcher.hs')
-rw-r--r--Role/Watcher.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/Role/Watcher.hs b/Role/Watcher.hs
index dd49621..f314b46 100644
--- a/Role/Watcher.hs
+++ b/Role/Watcher.hs
@@ -10,7 +10,6 @@ import Role.Developer
import Control.Concurrent.STM
import Control.Concurrent.STM.TMChan
-import Data.Time.Clock.POSIX
run :: WatchOpts -> IO ()
run = run' watcher . watchUrl
@@ -20,14 +19,4 @@ watcher dsv _ichan ochan sid = withSessionLogger sid $ \logger -> inRawMode $ do
sk <- genMySessionKey
(st, startoutput) <- processSessionStart sk ochan logger dsv
emitOutput startoutput
- go logger st
- where
- go logger st = do
- ts <- getPOSIXTime
- v <- atomically $ getServerMessage ochan st ts
- case v of
- Nothing -> return ()
- Just (o, msg) -> do
- _ <- logger msg
- emitOutput o
- go logger st
+ watchSessionReadOnly ochan logger st