aboutsummaryrefslogtreecommitdiff
path: root/Assistant/TransferSlots.hs
Commit message (Collapse)AuthorAge
* terminateProcessId renamedGravatar Joey Hess2017-10-25
| | | | win32 upstream suggested a better name
* build for windows with forked win32 package that has terminateProcessIdGravatar Joey Hess2017-10-25
| | | | | | | | | Get ugly reversion out of CHANGELOG. Also, relocated the windows stack.yaml to top, and updated windows build instructions. This commit was sponsored by Henrik Riomar on Patreon.
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* 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/
* support invalidating existing VerifiedCopysGravatar Joey Hess2015-10-08
|
* add VerifiedCopy data typeGravatar Joey Hess2015-10-08
| | | | | | | | | There should be no behavior changes in this commit, it just adds a more expressive data type and adjusts code that had been passing around a [UUID] or sometimes a Maybe Remote to instead use [VerifiedCopy]. Although, since some functions were taking two different [UUID] lists, there's some potential for me to have gotten it horribly wrong.
* When re-execing git-annex, use current program location, rather than ↵Gravatar Joey Hess2015-02-28
| | | | | | | | | | | | | | | | | | ~/.config/git-annex/program, when possible. Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* 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.
* windows: Fix process termination code.Gravatar Joey Hess2014-02-13
| | | | | | | | | | | The ctrl-c hack used before didn't actually seem to work. No haskell libraries expose TerminateProcess. I tried just calling it via FFI, but got segfaults, probably to do with the wacky process handle not being managed correctly. Moving it all into one C function worked. This was hell. The EvilLinker hack was just final icing on the cake. We all know what the cake was made of.
* try to drop unused object if it does not need to be transferred anywhereGravatar Joey Hess2014-01-23
|
* fix transfers of key with no associated fileGravatar Joey Hess2014-01-23
| | | | | | | | | | | | | | | | | Several places assumed this would not happen, and when the AssociatedFile was Nothing, did nothing. As part of this, preferred content checks pass the Key around. Note that checkMatcher is sometimes now called with Just Key and Just File. It currently constructs a FileMatcher, ignoring the Key. However, if it constructed a FileKeyMatcher, which contained both, then it might be possible to speed up parts of Limit, which currently call the somewhat expensive lookupFileKey to get the Key. I have not made this optimisation yet, because I am not sure if the key is always the same. Will need some significant checking to satisfy myself that's the case..
* typoGravatar Joey Hess2013-12-10
|
* different PID types for Unix and WindowsGravatar Joey Hess2013-12-10
| | | | | | | | Windows has a larger (unsigned) PID space, so cannot use the unix CInt there. Note that TransferInfo does not yet ever get the TransferPid populated, as there is missing locking.
* 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
|
* build assistant and watcher on windows (doesn't work yet)Gravatar Joey Hess2013-11-12
|
* moved code out of webappGravatar Joey Hess2013-10-26
| | | | | No code changes, aside from some changes to lifting in code that turned out to be able to run in Assistant rather than Handler.
* maintain pools of running transferkeys processes (untested)Gravatar Joey Hess2013-03-19
|
* better handling of lifting from XMPP -> AssistantGravatar Joey Hess2012-11-05
|
* where indentationGravatar Joey Hess2012-10-31
|
* finished pushing Assistant monad into all relevant filesGravatar Joey Hess2012-10-30
| | | | All temporary and old functions are removed.
* pushed Assistant monad down into DaemonStatus codeGravatar Joey Hess2012-10-30
| | | | | | Currently have three old versions of functions that more reworking is needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and modifyDaemonStatusOld
* split remaining assistant typesGravatar Joey Hess2012-10-30
|
* split out daemonstatus typesGravatar Joey Hess2012-10-30
|
* TransferSlots: Use SafeSemaphore's MSemN instead of QSemN from baseGravatar Ben Gamari2012-10-05
| | | | | As described in the documentation, QSemN is unsafe for a variety of reasons.
* hlintGravatar Joey Hess2012-09-13
|
* use only one level of exception handling for transfer slotGravatar Joey Hess2012-08-29
|
* bugGravatar Joey Hess2012-08-29
|
* fix repeated pause and resume of a transferGravatar Joey Hess2012-08-29
| | | | | | | I had an intuition that throwTo might be blocking because an exception was caught and the exception handler was running. This seems to be the case, and is avoided by using try. However, I can't really find anywhere in throwTo's documentation that justifies this behavior.
* remove debug printsGravatar Joey Hess2012-08-29
|
* fix a transfers display glitchGravatar Joey Hess2012-08-28
| | | | | | | | Run code that pops off the next queued transfer and adds it to the active transfer map within an allocated transfer slot, rather than before allocating a slot. Fixes the transfers display, which had been displaying the next transfer as a running transfer, while the previous transfer was still running.
* run resumed transfers immediately, do not wait for free transfer slotGravatar Joey Hess2012-08-12
| | | | | The resumed transfer still uses a slot, so will delay other, queued transfers from starting.
* implement pausing of transfersGravatar Joey Hess2012-08-10
| | | | | | A paused transfer's thread keeps running, keeping the slot in use. This is intentional; pausing a transfer should not let other queued transfers to run in its place.
* fork off git-annex copy for transfersGravatar Joey Hess2012-08-10
| | | | | | | | | | | | | | This doesn't quite work, because canceling a transfer sends a signal to git-annex, but not to rsync (etc). Looked at making git-annex run in its own process group, which could then be killed, and would kill child processes. But, rsync checks if it's process group is the foreground process group and doesn't show progress if not, and when git has run git-annex, if git-annex makes a new process group, that is not the case. Also, if git has run git-annex, ctrl-c wouldn't be propigated to it if it made a new process group. So this seems like a blind alley, but recording it here just in case.
* transfer cancelingGravatar Joey Hess2012-08-08
| | | | | | | | | | Should work (untested) for transfers being run by other processes. Not yet by transfers being run by the assistant. killThread does not kill processes forked off by a thread. To fix this, will probably need to make `git annex getkey` and `git annex sendkey` commands that operate on keys, and write their own transfer info. Then the assistant can run them, and kill them, as needed.
* avoid spawning new transfer thread until a slot becomes availableGravatar Joey Hess2012-07-25
|
* run file transfers in threads, not processesGravatar Joey Hess2012-07-18
| | | | | | This should fix OSX/BSD issues with not noticing transfer information files with kqueue. Now that threads are used, the thread can manage the transfer slot allocation and deallocation by itself; much cleaner.
* fix transfer slots blocking and refilling when transfers are stoppedGravatar Joey Hess2012-07-06
| | | | | There's a bug, if a transfer process notices it needs to do nothing, it never starts the transfer, so the slot is never freed.
* it builds againGravatar Joey Hess2012-07-06
Currently nothing waits on transfer processes. (Second drive of the day fried. Not concentrating very well.)