summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Pusher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-11 16:23:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-11 16:23:16 -0400
commit6068fd160ffeb930368a4c4c2a8818ace71f29ab (patch)
tree3f5a183e9594854a55f17cfdca740516943084c6 /Assistant/Threads/Pusher.hs
parent0d21e323e0d095232e347859adaaf2cc2cd71592 (diff)
don't try to transfer data to/from XMPP remotes
Partition syncRemotes into ones needing git sync (ie, non-special remotes), and ones needing data sync (ie, non-XMPP remotes).
Diffstat (limited to 'Assistant/Threads/Pusher.hs')
-rw-r--r--Assistant/Threads/Pusher.hs9
1 files changed, 2 insertions, 7 deletions
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs
index 69974a21c..035a454a1 100644
--- a/Assistant/Threads/Pusher.hs
+++ b/Assistant/Threads/Pusher.hs
@@ -15,7 +15,6 @@ import Assistant.Alert
import Assistant.DaemonStatus
import Assistant.Sync
import Utility.ThreadScheduler
-import qualified Remote
import qualified Types.Remote as Remote
import Data.Time.Clock
@@ -46,7 +45,8 @@ pushThread = NamedThread "Pusher" $ runEvery (Seconds 2) <~> do
-- Now see if now's a good time to push.
if shouldPush commits
then do
- remotes <- filter pushable . syncRemotes <$> getDaemonStatus
+ remotes <- filter (not . Remote.readonly)
+ . syncGitRemotes <$> getDaemonStatus
unless (null remotes) $
void $ alertWhile (pushAlert remotes) $ do
now <- liftIO $ getCurrentTime
@@ -54,11 +54,6 @@ pushThread = NamedThread "Pusher" $ runEvery (Seconds 2) <~> do
else do
debug ["delaying push of", show (length commits), "commits"]
refillCommits commits
- where
- pushable r
- | Remote.specialRemote r = False
- | Remote.readonly r = False
- | otherwise = True
{- Decide if now is a good time to push to remotes.
-