summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Transferrer.hs
Commit message (Collapse)AuthorAge
* 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/
* 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
|
* avoid repeatedly searching path to make batch command when running transferkeysGravatar Joey Hess2013-12-01
|
* assistant: Support repairing git remotes that are locally accessibleGravatar Joey Hess2013-10-27
| | | | | | | | (eg, on removable drives) gcrypt remotes are not yet handled. This commit was sponsored by Sören Brunk.
* 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.
* hlintGravatar Joey Hess2013-10-02
|
* rename moduleGravatar Joey Hess2013-04-23
|
* refactor alert button creation codeGravatar Joey Hess2013-04-04
|
* avoid removing a transfer being made by another processGravatar Joey Hess2013-03-28
| | | | | When another process is running a transfer, if we try to run a dup it'll fail, and we should not remove the transfer from the transfer display.
* maintain pools of running transferkeys processes (untested)Gravatar Joey Hess2013-03-19
|
* deal with transferkey crashingGravatar Joey Hess2013-03-18
| | | | | | | | | | If transferkey crashes or even fails to run, the TransferWatcher will not see the transfer info file be created, so will not remove the transfer from the list of active transfers. This causes the list to grow continually, and all active transfers are displayed in the webapp. So, put in a guard. I assume that transferkey will not exit 0 while neglecting to clean up.
* ensureGravatar Joey Hess2013-03-18
|
* optimisation for transfers to drives that are not plugged inGravatar Joey Hess2013-03-18
| | | | | | Rather than forking a git-annex transferkey only to have it fail, just immediately record the failed transfer (so when the drive is plugged in, the scan will retry it).
* assistant: Be smarter about avoiding unncessary transfers.Gravatar Joey Hess2013-03-13
| | | | | | | | | Just before starting a transfer, do one last check that it's still preferred content. I was just doing this for uploads, as part of the smarter flood filling bug, but realized it's also possible for a download that was preferred content to change to not be before the download begins, so check that too.
* tweakGravatar Joey Hess2013-03-13
|
* assistant: Fix dropping content when a file is moved to an archive directory.Gravatar Joey Hess2013-03-01
| | | | | | | A transfer is queued, but if the file has already been transferred to the remote before, the transfer is skipped. In this case, it needs to perform any actions it would normally take after finishing the transfer, like dropping the local object.
* add additional debug info about reasons for dropsGravatar Joey Hess2013-03-01
|
* add additional debug info about reasons for transfersGravatar Joey Hess2013-03-01
|
* webapp: Now allows restarting any threads that crash.Gravatar Joey Hess2013-01-26
|
* remove dead codeGravatar Joey Hess2012-12-01
|
* webapp and assistant glacier supportGravatar Joey Hess2012-11-24
|
* 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 Commits and liftedGravatar Joey Hess2012-10-29
|
* Assistant monad, stage 3Gravatar Joey Hess2012-10-29
| | | | | | All toplevel named threads are converted to the Assistant monad. Some utility functions still need to be converted.
* Assistant monad, stage 2.5Gravatar Joey Hess2012-10-29
| | | | | | | | | | Converted several threads to run in the monad. Added a lot of useful combinators for working with the monad. Now the monad includes the name of the thread. Some debugging messages are disabled pending converting other threads.
* ensure that git-annex branch is pushed after a successful transferGravatar Joey Hess2012-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I now have this topology working: assistant ---> {bare repo, special remote} <--- assistant And, I think, also this one: +----------- bare repo --------+ v v assistant ---> special remote <--- assistant While before with assistant <---> assistant connections, both sides got location info updated after a transfer, in this topology, the bare repo *might* get its location info updated, but the other assistant has no way to know that it did. And a special remote doesn't record location info, so transfers to it won't propigate out location log changes at all. So, for these to work, after a transfer succeeds, the git-annex branch needs to be pushed. This is done by recording a synthetic commit has occurred, which lets the pusher handle pushing out the change (which will include actually committing any still journalled changes to the git-annex branch). Of course, this means rather a lot more syncing action than happened before. At least the pusher bundles together very close together pushes, somewhat. Currently it just waits 2 seconds between each push.
* quiet calls to transferkeyGravatar Joey Hess2012-09-24
|
* when a Download finishes, queue UploadsGravatar Joey Hess2012-09-18
| | | | | | | | | | | | | | | | | | | This ensures file propigate takes place in situations such as: Usb drive A is connected to B. A's master branch is already in sync with B, but it is being used to sneakernet some files around, so B downloads those. There is no master branch change, so C does not request these files. B needs to upload the files it just downloaded on to C, etc. My first try at this, I saw loops happen. B uploaded to C, which then tried to upload back to B (because it had not received the updated git-annex branch from B yet). B already had the file, but it still created a transfer info file from the incoming transfer, and its watcher saw that be removed, and tried to upload back to C. These loops should have been fixed by my previous commit. (They never affected ssh remotes, only local ones, it seemed.) While C might still try to upload to B, or to some other remote that already has the file, the extra work dies out there.
* simplifyGravatar Joey Hess2012-09-17
|
* hlintGravatar Joey Hess2012-09-13
|
* display errors when any named thread crashesGravatar Joey Hess2012-09-06
|
* typoeGravatar Joey Hess2012-08-29
|
* make start button work on queued transfersGravatar Joey Hess2012-08-29
| | | | | | When multiple downloads of a key are queued, it starts the first, but leaves the other downloads in the queue. This ensures that we don't lose a queued download if the one that got started failed.
* avoid failure alerts for temporary transfer failuresGravatar Joey Hess2012-08-29
| | | | | Since a failed transfer gets retried until it succeeds, no point in bothering the user about them.
* 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.
* improve display of failed transfer alertGravatar Joey Hess2012-08-27
|
* use the ~/.config/git-annex/program file to find command when running transfersGravatar Joey Hess2012-08-27
|
* add transferkey commandGravatar Joey Hess2012-08-24
| | | | | | | Used by the assistant, rather than copy, this is faster because it avoids using git ls-files, avoids checking the location log redundantly, and runs in oneshot mode, avoiding making a commit to the git-annex branch for every file transferred.
* 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.
* process group killingGravatar Joey Hess2012-08-10
| | | | | | | | | | | | | | | | | | | | This seems to work pretty well. Handled the process groups like this: - git-annex processes started by the assistant for transfers are run in their own process groups. - otherwise, rely on the shell to allocate a process group for git-annex There is potentially a problem if some other program runs git-annex directly (not using sh -c) The program and git-annex would then be in the same process group. If that git-annex starts a transfer and it's canceled, the program would also get killed. May or may not be a desired result. Also, the new updateTransferInfo probably closes a race where it was possible for the thread id to not be recorded in the transfer info, if the transfer info file from the transfer process is read first.
* 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.
* added an alert after a file transferGravatar Joey Hess2012-08-06
|
* fix bug in transfer initiation checkingGravatar Joey Hess2012-07-29
| | | | | | | Putting the transfer on the currentTransfers atomically introduced a bug: It checks to see if the transfer is in progress, and cancels it. Fixed by moving that check inside the STM transaction.
* refactorGravatar Joey Hess2012-07-29
|
* send notifications when the TransferQueue is changedGravatar Joey Hess2012-07-28
| | | | | | The fun part was making it move things from TransferQueue to currentTransfers entirely atomically. Which will avoid inconsistent display if the WebApp renders the current status at just the wrong time. STM to the rescue!
* move DaemonStatus manipulation out of the Annex monad to IOGravatar Joey Hess2012-07-28
| | | | | | I've convinced myself that nothing in DaemonStatus can deadlock, as it always keepts the TMVar full. That was the only reason it was in the Annex monad.
* webapp now displays the real running and queued transfersGravatar Joey Hess2012-07-27
| | | | yowza!!!