summaryrefslogtreecommitdiff
path: root/Assistant.hs
Commit message (Collapse)AuthorAge
* build fix for non-webapp enabled buildGravatar Joey Hess2012-09-23
|
* 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.
* deferred downloadsGravatar Joey Hess2012-09-17
| | | | | | | | | | | | | Now when a download is queued and there's no known remote to get it from, it's added to a deferred download list, which will be retried later. The Merger thread tries to queue any deferred downloads when it receives a push to the git-annex branch. Note that the Merger thread now also forces an update of the git-annex branch. The assistant was not updating this branch before, and it saw a (mostly) correct view of state, but now that incoming pushes go to synced/git-annex, it needs to be merged in.
* hlintGravatar Joey Hess2012-09-13
|
* pairing probably works now (untested)Gravatar Joey Hess2012-09-10
|
* first pass at alert buttonsGravatar Joey Hess2012-09-08
| | | | | | | | | They work fine. But I had to go to a lot of trouble to get Yesod to render routes in a pure function. It may instead make more sense to have each alert have an assocated IO action, and a single route that runs the IO action of a given alert id. I just wish I'd realized that before the past several hours of struggling with something Yesod really doesn't want to allow.
* added pair listener threadGravatar Joey Hess2012-09-08
|
* display errors when any named thread crashesGravatar Joey Hess2012-09-06
|
* fix build without the webappGravatar Joey Hess2012-08-30
|
* add download progress polling threadGravatar Joey Hess2012-08-28
|
* add NetWatcher threadGravatar Joey Hess2012-08-21
| | | | | | This deals with interruptions in network connectevity, by listening for a new network interface coming up (using dbus to see when network-manager or wicd do it), and forcing a rescan of
* implement resuming of paused transfersGravatar Joey Hess2012-08-12
| | | | | Currently waits for a new transfer slot to open up, which probably needs to change..
* wire up scan and transfer to newly added removable driveGravatar Joey Hess2012-08-04
| | | | remote setup still todo
* start webapp thread earlier so it opens ASAPGravatar Joey Hess2012-08-02
|
* fix the watch command to not run the whole assistantGravatar Joey Hess2012-08-01
| | | | heh :)
* write pid file even when running in foregroundGravatar Joey Hess2012-08-01
| | | | | | | | This prevents multiple runs of the assistant in the foreground, and lets --stop stop foregrounded runs too. The webapp firstrun case also now writes a pid file, once it's made the git repo to put it in.
* implemented firstrun repository creation and redirection to full webappGravatar Joey Hess2012-08-01
| | | | Some of the trickiest code I've possibly ever written.
* webapp now starts up when run not in a git repoGravatar Joey Hess2012-07-31
|
* add more alertsGravatar Joey Hess2012-07-29
| | | | Nearly all long-running actions now display an alert.
* 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.
* much better webapp startup of the assistantGravatar Joey Hess2012-07-27
| | | | | | This avoids forking another process, avoids polling, fixes a race, and avoids a rare forkProcess thread hang that I saw once time when starting the webapp.
* add warning when building without the webappGravatar Joey Hess2012-07-27
|
* webapp now displays the real running and queued transfersGravatar Joey Hess2012-07-27
| | | | yowza!!!
* update thread listGravatar Joey Hess2012-07-26
|
* git annex webapp now opens a browser to the webappGravatar Joey Hess2012-07-25
| | | | Also, starts the assistant if it wasn't already running.
* run yesod, and launch webapp on startupGravatar Joey Hess2012-07-25
|
* 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.
* tweakGravatar Joey Hess2012-07-20
|
* MountWatcher threadGravatar Joey Hess2012-07-19
| | | | Currently only prints mount points when mounts happen.
* 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.)
* unfinished (and unbuildable) work toward separate transfer processesGravatar Joey Hess2012-07-05
|
* wrote transfer threadGravatar Joey Hess2012-07-05
| | | | finally!
* enqueue Downloads when new symlinks appear to content we don't haveGravatar Joey Hess2012-07-05
|
* 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.
* add transfer watching threadGravatar Joey Hess2012-07-03
| | | | Worked the 1st try!
* refactorGravatar Joey Hess2012-06-28
|
* improve thread termination handlingGravatar Joey Hess2012-06-28
| | | | | | | | | | The reason the DirWatcher had to wait for program termination was because it used withINotify, so when it finished, its watcher threads were killed. But since I have two DirWatcher threads now, that was not good, and could perhaps explain the MVar problem I saw yesterday. In any case, fixed this part of the code by making the DirWatcher return a handle that can be used to stop it, and now the main Assistant thread is the only one calling waitForTermination.
* tweakGravatar Joey Hess2012-06-28
|
* 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.
* add a push retry threadGravatar Joey Hess2012-06-25
|
* reorg threadsGravatar Joey Hess2012-06-25
|
* added a merger threadGravatar Joey Hess2012-06-22
| | | | | | Wow! I can create a file in repo a, and it instantly* shows up in repo b! * under 1 second anyway
* stub syncer thread and commit channelGravatar Joey Hess2012-06-22
|
* add assistant commandGravatar Joey Hess2012-06-22
| | | | like watch, but more magic
* pending adds now retried for kqueueGravatar Joey Hess2012-06-20
| | | | | | | | | | | | | | | | Rethought how to keep track of pending adds that need to be retried later. The commit thread already run up every second when there are changes, so let's keep pending adds queued as changes until they're safe to add. Also, the committer is now smarter about avoiding empty commits when all the adds are currently unsafe, or in the rare case that an add event for a symlink is not received in time. It may avoid them entirely. This seems to work as before for inotify, and is untested for kqueue. (Actually commit batching seems to be improved for inotify, although I'm not sure why. I'm seeing only two commits made during large batch operations, and the first of those is the non-batch mode commit.)
* maintain set of files pendingAddGravatar Joey Hess2012-06-20
| | | | | | | | Kqueue needs to remember which files failed to be added due to being open, and retry them. This commit gets the data in place for such a retry thread. Broke KeySource out into its own file, and added Eq and Ord instances so it can be stored in a Set.