summaryrefslogtreecommitdiff
path: root/doc/design/assistant/syncing.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-05 09:12:54 -0600
committerGravatar Joey Hess <joey@kitenet.net>2012-07-05 09:12:54 -0600
commitb0894f00c075e4dd93a692880e8eb0ea865b6c28 (patch)
tree913802df5ed3184f83c82a846c8641719e3583a7 /doc/design/assistant/syncing.mdwn
parentb4917bd18fa9e2eacb5fbd916828d30e2ac297b4 (diff)
parent59f8413abe89b9abe5708fc0ab3aba93fa2c0f64 (diff)
Merge branch 'master' into assistant
Diffstat (limited to 'doc/design/assistant/syncing.mdwn')
-rw-r--r--doc/design/assistant/syncing.mdwn21
1 files changed, 12 insertions, 9 deletions
diff --git a/doc/design/assistant/syncing.mdwn b/doc/design/assistant/syncing.mdwn
index e3fdca316..aa3c6066b 100644
--- a/doc/design/assistant/syncing.mdwn
+++ b/doc/design/assistant/syncing.mdwn
@@ -10,14 +10,15 @@ all the other git clones, at both the git level and the key/value level.
* transfer info for git-annex-shell **done**
* update files as transfers proceed. See [[progressbars]]
(updating for downloads is easy; for uploads is hard)
-* add Transfer queue TChan
+* add Transfer queue TChan **done**
+* add TransferInfo Map to DaemonStatus for tracking transfers in progress.
+ **done**
+* Poll transfer in progress info files for changes (use inotify again!
+ wow! hammer, meet nail..), and update the TransferInfo Map **done**
* enqueue Transfers (Uploads) as new files are added to the annex by
Watcher.
* enqueue Tranferrs (Downloads) as new dangling symlinks are noticed by
Watcher.
-* add TransferInfo Map to DaemonStatus for tracking transfers in progress.
-* Poll transfer in progress info files for changes (use inotify again!
- wow! hammer, meet nail..), and update the TransferInfo Map
* Write basic Transfer handling thread. Multiple such threads need to be
able to be run at once. Each will need its own independant copy of the
Annex state monad.
@@ -52,6 +53,9 @@ all the other git clones, at both the git level and the key/value level.
signaling a change out of band.
4. Add a hook, so when there's a change to sync, a program can be run
and do its own signaling.
+5. --debug will show often unnecessary work being done. Optimise.
+6. It would be nice if, when a USB drive is connected,
+ syncing starts automatically. Use dbus on Linux?
## misc todo
@@ -89,13 +93,12 @@ anyway.
that lack content.
* Transfer threads started/stopped as necessary to move data.
(May sometimes want multiple threads downloading, or uploading, or even both.)
-
- type TransferQueue = TChan [Transfer]
- -- add (M.Map Transfer TransferInfo) to DaemonStatus
- startTransfer :: Transfer -> Annex TransferID
+ startTransfer :: TransferQueue -> Transfer -> Annex ()
+ startTransfer q transfer = error "TODO"
- stopTransfer :: TransferID -> IO ()
+ stopTransfer :: TransferQueue -> TransferID -> Annex ()
+ stopTransfer q transfer = error "TODO"
The assistant needs to find out when `git-annex-shell` is receiving or
sending (triggered by another remote), so it can add data for those too.