summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Pusher.hs
Commit message (Collapse)AuthorAge
* add exporter thread to assistantGravatar Joey Hess2017-09-20
| | | | | | | | | | | | | | | | | | | | | | | This is similar to the pusher thread, but a separate thread because git pushes can be done in parallel with exports, and updating a big export should not prevent other git pushes going out in the meantime. The exportThread only runs at most every 30 seconds, since updating an export is more expensive than pushing. This may need to be tuned. Added a separate channel for export commits; the committer records a commit in that channel. Also, reconnectRemotes records a dummy commit, to make the exporter thread wake up and make sure all exports are up-to-date. So, connecting a drive with a directory special remote export will immediately update it, and getting online will automatically update S3 and WebDAV exports. The transfer queue is not involved in exports. Instead, failed exports are retried much like failed pushes. This commit was sponsored by Ewen McNeill.
* remove xmpp supportGravatar Joey Hess2016-11-14
| | | | | | | | | | | | I've long considered the XMPP support in git-annex a wart. It's nice to remove it. (This also removes the NetMessager, which was only used for XMPP, and the daemonstatus's desynced list (likewise).) Existing XMPP remotes should be ignored by git-annex. This commit was sponsored by Brock Spratlen on Patreon.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* automatically launch git repository repairGravatar Joey Hess2013-10-27
| | | | | | | | | | | | | | | | | | Added a RemoteChecker thread, that waits for problems to be reported with remotes, and checks if their git repository is in need of repair. Currently, only failures to sync with the remote cause a problem to be reported. This seems enough, but we'll see. Plugging in a removable drive with a repository on it that is corrupted does automatically repair the repository, as long as the corruption causes git push or git pull to fail. Some types of corruption do not, eg missing/corrupt objects for blobs that git push doesn't need to look at. So, this is not really a replacement for scheduled git repository fscking. But it does make the assistant more robust. This commit is sponsored by Fernando Jimenez.
* use a DList for the deferred downloads queueGravatar Joey Hess2013-04-25
|
* remove last use of TSetGravatar Joey Hess2013-04-24
|
* webapp: Improved alerts displayed when syncing with remotes, and when ↵Gravatar Joey Hess2013-03-18
| | | | syncing with a remote fails.
* avoid ugly alert caused by trying to push to unavailable removable driveGravatar Joey Hess2013-03-10
|
* avoid false alert about syncing with xmpp remoteGravatar Joey Hess2013-03-06
|
* webapp: Now allows restarting any threads that crash.Gravatar Joey Hess2013-01-26
|
* don't try to transfer data to/from XMPP remotesGravatar Joey Hess2012-11-11
| | | | | Partition syncRemotes into ones needing git sync (ie, non-special remotes), and ones needing data sync (ie, non-XMPP remotes).
* where indentationGravatar Joey Hess2012-10-31
|
* cleanup daemonStatus accessorsGravatar Joey Hess2012-10-30
|
* split remaining assistant typesGravatar Joey Hess2012-10-30
|
* split out daemonstatus typesGravatar Joey Hess2012-10-30
|
* split Commits and liftedGravatar Joey Hess2012-10-29
|
* split and lift Assistant.PushesGravatar Joey Hess2012-10-29
|
* lift alertWhileGravatar Joey Hess2012-10-29
|
* lifted Assistant.Sync into Assistant monadGravatar Joey Hess2012-10-29
| | | | lots of nice cleanups
* converted 6 more threadsGravatar Joey Hess2012-10-29
|
* 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.
* added push notifier thread, currently a no-opGravatar Joey Hess2012-10-24
| | | | | | | | | | | Hooked up everything that needs to notify on pushes. Note that syncNewRemote does not notify. This is probably ok, and I'd need to thread more state through to make it do so. This is only set up to support a single push notification method; I didn't use a NotificationBroadcaster. Partly because I don't yet know what info about pushes needs to be communicated, so my data types are only preliminary.
* better variable nameGravatar Joey Hess2012-10-14
|
* hlintGravatar Joey Hess2012-09-13
|
* display errors when any named thread crashesGravatar Joey Hess2012-09-06
|
* add support for readonly remotesGravatar Joey Hess2012-08-26
| | | | | | | Currently only the web special remote is readonly, but it'd be possible to also have readonly drives, or other remotes. These are handled in the assistant by only downloading from them, and never trying to upload to them.
* don't exclude special remotes from the knownRemotes list used by the assistantGravatar Joey Hess2012-08-26
| | | | But do exclude them when pushing out changes.
* refactorGravatar Joey Hess2012-08-22
|
* handle case of adding populated drive to just created repoGravatar Joey Hess2012-08-05
| | | | | The just created repo has no master branch commits yet. This is now handled, merging in the master branch from the populated drive.
* fix crashes when run in a git repo that has been initted but has no master ↵Gravatar Joey Hess2012-08-05
| | | | branch yet
* avoid showing alert when there are no remotes to push toGravatar Joey Hess2012-08-02
|
* fix push status, broken when inParallel was adapted for -threadedGravatar Joey Hess2012-07-30
| | | | | Before pushing ran in its own process, so exitSuccess was the right thing to do, but with the threaded code, that's caught as an exception.
* make old activiy alerts stay visibleGravatar Joey Hess2012-07-30
| | | | | | They're updated to show whether the activity succeeded or failed. This adds several TODOs to the code to fix later.
* moved all alert messages into one fileGravatar Joey Hess2012-07-29
| | | | Makes it easier to edit for consistent voice etc.
* add more alertsGravatar Joey Hess2012-07-29
| | | | Nearly all long-running actions now display an alert.
* 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.
* add TransferScanner threadGravatar Joey Hess2012-07-22
| | | | | Efficiently finding transfers that need to be done to get two repos back in sync seems like an interesting problem.
* debugging improvementsGravatar Joey Hess2012-07-20
| | | | | | add timestamps to debug messages Add lots of debug output in the assistant's threads.
* queue Uploads of newly added files to remotesGravatar Joey Hess2012-07-05
| | | | | | | Added knownRemotes to DaemonStatus. This list is not entirely trivial to calculate, and having it here should make it easier to add/remove remotes on the fly later on. It did require plumbing the daemonstatus through to some more threads.
* use a TMVarGravatar Joey Hess2012-06-26
| | | | | | | SampleMVar won't work; between getting the current value and changing it, another thread could made a change, which would get lost. TMVar works well; this update situation is handled by atomic transactions.
* fixup merges now done when neededGravatar Joey Hess2012-06-25
|
* add a push retry threadGravatar Joey Hess2012-06-25
|
* reorg threadsGravatar Joey Hess2012-06-25