diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-29 13:41:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-29 13:41:44 -0400 |
commit | 2db78797ee58e53f06bd2d104fb203c45247e7c0 (patch) | |
tree | 3b8b7ab10eeb2cb8c787a6d57c1a03bb623ece6a /Assistant/RepoProblem.hs | |
parent | 255354acc20f2680126b22cc02a0893d1d72d804 (diff) |
move code around and rename thread; no functional changes
Diffstat (limited to 'Assistant/RepoProblem.hs')
-rw-r--r-- | Assistant/RepoProblem.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Assistant/RepoProblem.hs b/Assistant/RepoProblem.hs new file mode 100644 index 000000000..d2e5a5cf1 --- /dev/null +++ b/Assistant/RepoProblem.hs @@ -0,0 +1,23 @@ +{- git-annex assistant remote problem handling + - + - Copyright 2013 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Assistant.RepoProblem where + +import Assistant.Common +import Utility.TList + +import Control.Concurrent.STM + +{- Gets all repositories that have problems. + - Blocks until there is at least one. -} +getRepoProblems :: Assistant [UUID] +getRepoProblems = (atomically . getTList) <<~ repoProblemChan + +{- Indicates that there was a problem accessing a repo, and the problem + - appears to not be a transient (eg network connection) problem. -} +repoHasProblem :: UUID -> Assistant () +repoHasProblem r = (atomically . flip consTList r) <<~ repoProblemChan |