summaryrefslogtreecommitdiff
path: root/Assistant/Threads/SanityChecker.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 09:55:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 09:55:40 -0400
commit710dfa7e3ec897d6f02930540b10bb303e3a9c91 (patch)
tree5f046ee72ac000008b1e4c7853d5c3a788ec802e /Assistant/Threads/SanityChecker.hs
parent579f63b6b756ca51b8f9fe53c3e668500718d91f (diff)
convert Watcher thread to Assistant monad
This is a nice win; much less code runs in Annex, so other threads have more chances to run concurrently. I do notice that renaming a file has gone from 1 to 2 commits. I think this is due to the above improvement letting the committer run more frequently, so it commits the rm first.
Diffstat (limited to 'Assistant/Threads/SanityChecker.hs')
-rw-r--r--Assistant/Threads/SanityChecker.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index 6379eee46..d92c6c394 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -90,9 +90,5 @@ check = do
dstatus <- getAssistant daemonStatusHandle
liftIO $ void $ addAlert dstatus $ sanityCheckFixAlert msg
addsymlink file s = do
- d <- getAssistant id
- liftIO $ Watcher.runHandler (threadName d)
- (threadState d) (daemonStatusHandle d)
- (transferQueue d) (changeChan d)
- Watcher.onAddSymlink file s
+ Watcher.runHandler Watcher.onAddSymlink file s
insanity $ "found unstaged symlink: " ++ file