assistant: Sync with all git remotes on startup.
This commit is contained in:
parent
5fefb49bc9
commit
0e508f860a
3 changed files with 10 additions and 8 deletions
|
@ -14,6 +14,7 @@ import Assistant.TransferQueue
|
|||
import Assistant.DaemonStatus
|
||||
import Assistant.Alert
|
||||
import Assistant.Drop
|
||||
import Assistant.Sync
|
||||
import Logs.Transfer
|
||||
import Logs.Location
|
||||
import Logs.Web (webUUID)
|
||||
|
@ -45,11 +46,14 @@ transferScannerThread = namedThread "TransferScanner" $ do
|
|||
else do
|
||||
mapM_ failedTransferScan rs
|
||||
go scanned
|
||||
{- All available remotes are scanned in full on startup,
|
||||
- for multiple reasons, including:
|
||||
{- All git remotes are synced, and all available remotes
|
||||
- are scanned in full on startup, for multiple reasons, including:
|
||||
-
|
||||
- * This may be the first run, and there may be remotes
|
||||
- already in place, that need to be synced.
|
||||
- * Changes may have been made last time we run, but remotes were
|
||||
- not available to be synced with.
|
||||
- * Changes may have been made to remotes while we were down.
|
||||
- * We may have run before, and scanned a remote, but
|
||||
- only been in a subdirectory of the git remote, and so
|
||||
- not synced it all.
|
||||
|
@ -57,7 +61,9 @@ transferScannerThread = namedThread "TransferScanner" $ do
|
|||
- and then the system (or us) crashed, and that info was
|
||||
- lost.
|
||||
-}
|
||||
startupScan = addScanRemotes True =<< syncDataRemotes <$> getDaemonStatus
|
||||
startupScan = do
|
||||
reconnectRemotes True =<< syncGitRemotes <$> getDaemonStatus
|
||||
addScanRemotes True =<< syncDataRemotes <$> getDaemonStatus
|
||||
|
||||
{- This is a cheap scan for failed transfers involving a remote. -}
|
||||
failedTransferScan :: Remote -> Assistant ()
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -33,6 +33,7 @@ git-annex (4.20130228) UNRELEASED; urgency=low
|
|||
* Bugfix: git annex add, when ran without any file or directory specified,
|
||||
should add files in the current directory, but not act on unlocked files
|
||||
elsewhere in the tree.
|
||||
* assistant: Sync with all git remotes on startup.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 27 Feb 2013 23:20:40 -0400
|
||||
|
||||
|
|
|
@ -14,11 +14,6 @@ who share a repository, that is stored in the [[cloud]].
|
|||
push notification use of XMPP, since unknown UUIDs will just be ignored.
|
||||
But XMPP pairing and the pushes over XMPP assume that anyone you're
|
||||
paired with is intending to sync to your repository.
|
||||
* Disconnect network, make change, stop assistant, reconnect network,
|
||||
start assistant. Change is not propigated. Seems nothing handles
|
||||
calling reconnectRemotes on startup. (If the change gets committed during
|
||||
startup, it does get synced out, by other means.) This is probably not
|
||||
xmpp specific really.
|
||||
|
||||
## design goals
|
||||
|
||||
|
|
Loading…
Reference in a new issue