| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
heh :)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Some of the trickiest code I've possibly ever written.
|
| |
|
|
|
|
| |
Nearly all long-running actions now display an alert.
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
yowza!!!
|
| |
|
|
|
|
| |
Also, starts the assistant if it wasn't already running.
|
| |
|
|
|
|
|
| |
Efficiently finding transfers that need to be done to get two repos back
in sync seems like an interesting problem.
|
|
|
|
|
|
| |
add timestamps to debug messages
Add lots of debug output in the assistant's threads.
|
| |
|
|
|
|
| |
Currently only prints mount points when mounts happen.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Currently nothing waits on transfer processes.
(Second drive of the day fried. Not concentrating very well.)
|
| |
|
|
|
|
| |
finally!
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Worked the 1st try!
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Wow! I can create a file in repo a, and it instantly* shows up in repo b!
* under 1 second anyway
|
| |
|
|
|
|
| |
like watch, but more magic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Move lsof check, and display a message before daemon startup if on an
unsupported OS.
|
| |
|
|
|
|
|
| |
Check for it in configure; and add a --force option for people without it
who want to live dangerously.
|
| |
|
| |
|
|
|
|
| |
Currently wakes up once a day, and does nothing. :)
|
| |
|
|
|