finished pushing Assistant monad into all relevant files

All temporary and old functions are removed.
This commit is contained in:
Joey Hess 2012-10-30 17:14:26 -04:00
parent 47d94eb9a4
commit 93ffd47d76
26 changed files with 262 additions and 301 deletions

View file

@ -54,7 +54,7 @@ needLsof = error $ unlines
watchThread :: NamedThread
watchThread = NamedThread "Watcher" $ do
startup <- asIO startupScan
startup <- asIO1 startupScan
addhook <- hook onAdd
delhook <- hook onDel
addsymlinkhook <- hook onAddSymlink
@ -182,12 +182,9 @@ onAddSymlink file filestatus = go =<< liftAnnex (Backend.lookupFile file)
checkcontent key daemonstatus
| scanComplete daemonstatus = do
present <- liftAnnex $ inAnnex key
dstatus <- getAssistant daemonStatusHandle
unless present $ do
transferqueue <- getAssistant transferQueue
liftAnnex $ queueTransfers Next transferqueue
dstatus key (Just file) Download
liftAnnex $ handleDrops dstatus present key (Just file)
unless present $
queueTransfers Next key (Just file) Download
handleDrops present key (Just file)
| otherwise = noop
onDel :: Handler