summaryrefslogtreecommitdiff
path: root/Assistant/TransferrerPool.hs
Commit message (Collapse)AuthorAge
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* get, move, copy, mirror: Added --failed switch which retries failed copies/movesGravatar Joey Hess2016-08-03
| | | | | | | | | Note that get --from foo --failed will get things that a previous get --from bar tried and failed to get, etc. I considered making --failed only retry transfers from the same remote, but it was easier, and seems more useful, to not have the same remote requirement. Noisy due to some refactoring into Types/
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* export CreateProcess fields from Utility.ProcessGravatar Joey Hess2014-06-10
| | | | update code to avoid cwd and env redefinition warnings
* assistant: When there are multiple remotes giving different ways to access ↵Gravatar Joey Hess2014-05-19
| | | | | | | | | | | | the same repository, honor remote cost settings and use the cheapest available. Note that TransferInfo does not always contain the Remote, although any transfer added to the TransferQueue does have a Remote in its TransferInfo. The transferkeys command still accepts a UUID, which is useful to handle upgrades, where an old assistant version runs the new transferkeys. This commit was sponsored by Kalle Svensson.
* tested transferkeys restarting; fix some bugsGravatar Joey Hess2014-01-06
|
* assistant: Start a new git-annex transferkeys process after a network ↵Gravatar Joey Hess2014-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connection change So that remotes that use a persistent network connection are restarted. A remote might keep open a long duration network connection, and could fail to deal well with losing the connection. This is particularly a concern now that we have external special reotes. An external special remote that is implemented naively might open the connection only when PREPARE is sent, and if it loses connection, throw errors on each request that is made. (Note that the ssh connection caching should not have this problem; if the long-duration ssh process loses connection, the named pipe is disconnected and the next ssh attempt will reconnect. Also, XMPP already deals with disconnection robustly in its own way.) There's no way for git-annex to know if a lost network connection actually affects a given remote, which might have a transfer in process. It does not make sense to force kill the transferkeys process every time the NetWatcher detects a change. (Especially because the NetWatcher sometimes polls 1 change per hour.) In any case, the NetWatcher only detects connection to a network, not disconnection. So if a transfer is in progress over the network, and the network goes down, that will need to time out on its own. An alternate approch that was considered is to use a separate transferkeys process for each remote, and detect when a request fails, and assume that means that process is in a failing state and restart it. The problem with that approach is that if a resource is not available and a remote fails every time, it degrades to starting a new transferkeys process for every file transfer, which is too expensive. Instead, this commit only handles the network reconnection case, and restarts transferkeys only once the network has reconnected and another transfer needs to be made. So, a transferkeys process will be reused for 1 hour, or until the next network connection. ---- The NotificationBroadcaster was rewritten to use TMVars rather than MSampleVars, to allow checking without blocking if a notification has been received. ---- This commit was sponsored by Tobias Brunner.
* port transferkeys to windows; make stopping in progress transfers work too ↵Gravatar Joey Hess2013-12-10
| | | | | | | | | | | | | | | (probably) transferkeys had used special FDs for communication, but that would be quite annoying to do in Windows. Instead, use stdin and stdout. But, to avoid commands like rsync stomping on them and messing up the communications channel, they're duplicated to a different handle; stdin is replaced with a null handle, and stdout is replaced with a copy of stderr. This should all work in windows too. Stopping in progress transfers may work on windows.. if the types unify anyway. ;) May need some more porting.
* avoid repeatedly searching path to make batch command when running transferkeysGravatar Joey Hess2013-12-01
|
* assistant: Run transferkeys as batch jobs.Gravatar Joey Hess2013-12-01
|
* build assistant and watcher on windows (doesn't work yet)Gravatar Joey Hess2013-11-12
|
* moved AssociatedFile definitionGravatar Joey Hess2013-07-04
|
* 2 minor fixes to transferkeys, otherwise it was perfect 1st time!Gravatar Joey Hess2013-03-20
| | | | | | | | Needed to send a trailing NUL to end a request, and set the read handle non-blocking. Also, set fileSystemEncoding on all handles, since there's a filename in there.
* maintain pools of running transferkeys processes (untested)Gravatar Joey Hess2013-03-19