diff options
author | 2012-08-28 14:04:28 -0400 | |
---|---|---|
committer | 2012-08-28 14:04:28 -0400 | |
commit | 7024a973b222c32f44a7168532afae520e7474ed (patch) | |
tree | 36dc8bccf53e19eecc29d6343b786637e01bf70c /doc/design/assistant/progressbars.mdwn | |
parent | 9ea389ee2f741b4b7af69c02a6376a0a4cf7feb8 (diff) |
add download progress polling thread
Diffstat (limited to 'doc/design/assistant/progressbars.mdwn')
-rw-r--r-- | doc/design/assistant/progressbars.mdwn | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/design/assistant/progressbars.mdwn b/doc/design/assistant/progressbars.mdwn index ee7384274..33d736afd 100644 --- a/doc/design/assistant/progressbars.mdwn +++ b/doc/design/assistant/progressbars.mdwn @@ -5,10 +5,24 @@ for it, in the terminal. Something better is needed for the [[webapp]]. There needs to be a way for the web app to know what the current progress is of all transfers. -To get this info for downloads, git-annex can watch the file as it arrives -and use its size. +This is one of those potentially hidden but time consuming problems. -TODO: What about uploads? Will i have to parse rsync's progresss output? -Feed it via a named pipe? Ugh. Check into librsync. +## downloads -This is one of those potentially hidden but time consuming problems. +* Watch temp file as it's coming in and use its size. + This is the only option for some special remotes (ie, non-rsync). + Can either poll every .5 seconds or so to check file size, or + could use inotify. Implemented. +* Feed rsync output into a parser and parse out a progress value. Ugly, + failure prone, but potentially the least CPU-expensive option. +* Use librsync. Note: It's not wire-compatiable with the actual rsync + command. +* Set up a FIFO, have rsync read from or write to that, and the FIFO + feeder/reader then can update the transfer info. Generic enough to + work for most (all?) special remotes, but also the most expensive option, + involving another copy through memory of the whole file contents. + +## uploads + +Cannot use temp file, as we're not receiving it. Rsync progress parser, +librsync, and FIFO all work. |