diff options
Diffstat (limited to 'Assistant/RemoteProblem.hs')
-rw-r--r-- | Assistant/RemoteProblem.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Assistant/RemoteProblem.hs b/Assistant/RemoteProblem.hs new file mode 100644 index 000000000..c064a9475 --- /dev/null +++ b/Assistant/RemoteProblem.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.RemoteProblem where + +import Assistant.Common +import Utility.TList + +import Control.Concurrent.STM + +{- Gets all remotes that have problems. + - Blocks until there is at least one. -} +getRemoteProblems :: Assistant [Remote] +getRemoteProblems = (atomically . getTList) <<~ remoteProblemChan + +{- Indicates that there was a problem accessing a remote, and the problem + - appears to not be a transient (eg network connection) problem. -} +remoteHasProblem :: Remote -> Assistant () +remoteHasProblem r = (atomically . flip consTList r) <<~ remoteProblemChan |