diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-03 10:58:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-03 10:58:40 -0400 |
commit | b4917bd18fa9e2eacb5fbd916828d30e2ac297b4 (patch) | |
tree | e7f54a3ecb15a23ece1f5383c1d37b0b1d38e2dc /Assistant.hs | |
parent | 32e5e02e431338a7b04990ab91feaea7b32d6d0e (diff) |
add transfer watching thread
Worked the 1st try!
Diffstat (limited to 'Assistant.hs')
-rw-r--r-- | Assistant.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Assistant.hs b/Assistant.hs index a077cf10f..40f53d55e 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -33,9 +33,14 @@ - updated branches into the current branch. This uses inotify - on .git/refs/heads, so there are additional inotify threads - associated with it, too. - - Thread 9: status logger + - Thread 9: transfer watcher + - Watches for transfer information files being created and removed, + - and maintains the DaemonStatus currentTransfers map. This uses + - inotify on .git/annex/transfer/, so there are additional inotify + - threads associated with it, too. + - Thread 10: status logger - Wakes up periodically and records the daemon's status to disk. - - Thread 10: sanity checker + - Thread 11: sanity checker - Wakes up periodically (rarely) and does sanity checks. - - ThreadState: (MVar) @@ -56,6 +61,8 @@ - FailedPushMap (STM TMVar) - Failed pushes are indicated by writing to this TMVar. The push - retrier blocks until they're available. + - TransferQueue (STM TChan) + - Transfers to make are indicated by writing to this channel. -} module Assistant where @@ -70,6 +77,7 @@ import Assistant.Threads.Watcher import Assistant.Threads.Committer import Assistant.Threads.Pusher import Assistant.Threads.Merger +import Assistant.Threads.TransferWatcher import Assistant.Threads.SanityChecker import qualified Utility.Daemon import Utility.LogFile @@ -100,6 +108,7 @@ startDaemon assistant foreground , pushThread st commitchan pushmap , pushRetryThread st pushmap , mergeThread st + , transferWatcherThread st dstatus , daemonStatusThread st dstatus , sanityCheckerThread st dstatus changechan , watchThread st dstatus changechan |