summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:35:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:35:18 -0400
commitde83800ab39649992cd7f9ae61689820138613bd (patch)
treeb0010403a376694f42cc3e36d8ccc3b5365c9d65 /Assistant/Threads
parent4c12d38e33923c929a1a264d5b511fb5b8afdf33 (diff)
split Commits and lifted
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/Committer.hs2
-rw-r--r--Assistant/Threads/ConfigMonitor.hs2
-rw-r--r--Assistant/Threads/Pusher.hs5
-rw-r--r--Assistant/Threads/Transferrer.hs2
4 files changed, 6 insertions, 5 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index 3c283e38b..79b3812ee 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -61,7 +61,7 @@ commitThread = NamedThread "Committer" $ do
]
void $ alertWhile commitAlert $
liftAnnex commitStaged
- recordCommit <<~ commitChan
+ recordCommit
else refill readychanges
else refill changes
where
diff --git a/Assistant/Threads/ConfigMonitor.hs b/Assistant/Threads/ConfigMonitor.hs
index aa4718cf3..ce44105df 100644
--- a/Assistant/Threads/ConfigMonitor.hs
+++ b/Assistant/Threads/ConfigMonitor.hs
@@ -48,7 +48,7 @@ configMonitorThread = NamedThread "ConfigMonitor" $ loop =<< getConfigs
reloadConfigs new
{- Record a commit to get this config
- change pushed out to remotes. -}
- recordCommit <<~ commitChan
+ recordCommit
loop new
{- Config files, and their checksums. -}
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs
index c87df1610..905cf81db 100644
--- a/Assistant/Threads/Pusher.hs
+++ b/Assistant/Threads/Pusher.hs
@@ -9,6 +9,7 @@ module Assistant.Threads.Pusher where
import Assistant.Common
import Assistant.Commits
+import Assistant.Types.Commits
import Assistant.Pushes
import Assistant.Alert
import Assistant.DaemonStatus
@@ -41,7 +42,7 @@ pushThread :: NamedThread
pushThread = NamedThread "Pusher" $ runEvery (Seconds 2) <~> do
-- We already waited two seconds as a simple rate limiter.
-- Next, wait until at least one commit has been made
- commits <- getCommits <<~ commitChan
+ commits <- getCommits
-- Now see if now's a good time to push.
if shouldPush commits
then do
@@ -52,7 +53,7 @@ pushThread = NamedThread "Pusher" $ runEvery (Seconds 2) <~> do
pushToRemotes now True remotes
else do
debug ["delaying push of", show (length commits), "commits"]
- flip refillCommits commits <<~ commitChan
+ refillCommits commits
where
pushable r
| Remote.specialRemote r = False
diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs
index 145abe86d..6bcb05e0e 100644
--- a/Assistant/Threads/Transferrer.hs
+++ b/Assistant/Threads/Transferrer.hs
@@ -81,7 +81,7 @@ startTransfer program t info = case (transferRemote info, associatedFile info) o
liftIO $ void $ addAlert dstatus $
makeAlertFiller True $
transferFileAlert direction True file
- recordCommit <<~ commitChan
+ recordCommit
where
params =
[ Param "transferkey"