diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-08 15:23:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-08 15:23:50 -0400 |
commit | 6328d368fc73de7c91cb6efa25769297df71897d (patch) | |
tree | e240f3d920c7f5bc3dd8f2f54d294497779a53a9 /Assistant/Threads/NetWatcher.hs | |
parent | 9b09962ee86ec7531d7ca946e62ccf6a48a67399 (diff) |
assistant: Now detects immediately when other repositories push changes to
a ssh remote, and pulls.
XMPP is no longer needed in this configuration!
Requires the remote server have git-annex-shell with notifychanges support.
(untested)
This commit was sponsored by Geog Wechslberger.
Diffstat (limited to 'Assistant/Threads/NetWatcher.hs')
-rw-r--r-- | Assistant/Threads/NetWatcher.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs index 0b009647c..912893b87 100644 --- a/Assistant/Threads/NetWatcher.hs +++ b/Assistant/Threads/NetWatcher.hs @@ -15,6 +15,7 @@ import Assistant.Sync import Utility.ThreadScheduler import qualified Types.Remote as Remote import Assistant.DaemonStatus +import Assistant.RemoteControl import Utility.NotificationBroadcaster #if WITH_DBUS @@ -44,8 +45,9 @@ netWatcherThread = thread noop - while (despite the local network staying up), are synced with - periodically. - - - Note that it does not call notifyNetMessagerRestart, because - - it doesn't know that the network has changed. + - Note that it does not call notifyNetMessagerRestart, or + - signal the RemoteControl, because it doesn't know that the + - network has changed. -} netWatcherFallbackThread :: NamedThread netWatcherFallbackThread = namedThread "NetWatcherFallback" $ @@ -69,8 +71,10 @@ dbusThread = do ) handleconn = do debug ["detected network connection"] + sendRemoteControl PAUSE notifyNetMessagerRestart handleConnection + sendRemoteControl RESUME onerr e _ = do liftAnnex $ warning $ "lost dbus connection; falling back to polling (" ++ show e ++ ")" |