diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-21 17:49:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-21 17:49:56 -0400 |
commit | 40c91a0d45a875b8ef58c42a38fb29f4a608b425 (patch) | |
tree | 1ba0bcab443dfad4301d3d824034067d57fce4c3 /Assistant/Threads/NetWatcher.hs | |
parent | 5ec99409fa0e4ec617f70c4c87c6f7c8460b61c4 (diff) |
upgrade alerts
The webapp will check twice a day, when the network is connected, to see if
it can download a distributon upgrade file. If a newer version is found,
display an upgrade alert.
This will need the autobuilders to set UPGRADE_LOCATION to the url
it can be downloaded from when building git-annex. Only builds with that
set need automatic upgrade alerts.
Currently, the upgrade page just requests the user manually download
and upgrade it. But, all the info is provided to do automated upgrades
in the future.
Note that urls used will need to all be https.
This commit was sponsored by Dirk Kraft.
Diffstat (limited to 'Assistant/Threads/NetWatcher.hs')
-rw-r--r-- | Assistant/Threads/NetWatcher.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs index 0d8442c69..a7124fa01 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 Utility.NotificationBroadcaster #if WITH_DBUS import Utility.DBus @@ -127,7 +128,9 @@ listenWicdConnections client callback = #endif handleConnection :: Assistant () -handleConnection = reconnectRemotes True =<< networkRemotes +handleConnection = do + liftIO . sendNotification . networkConnectedNotifier =<< getDaemonStatus + reconnectRemotes True =<< networkRemotes {- Network remotes to sync with. -} networkRemotes :: Assistant [Remote] |