add post-repair actions
This commit is contained in:
parent
791c8535b5
commit
496c8b7abb
9 changed files with 113 additions and 71 deletions
|
@ -1,4 +1,4 @@
|
|||
{- git-annex assistant remote problem detection
|
||||
{- git-annex assistant repository problem tracking
|
||||
-
|
||||
- Copyright 2013 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
|
@ -11,8 +11,18 @@ import Types
|
|||
import Utility.TList
|
||||
|
||||
import Control.Concurrent.STM
|
||||
import Data.Function
|
||||
|
||||
type RepoProblemChan = TList UUID
|
||||
data RepoProblem = RepoProblem
|
||||
{ problemUUID :: UUID
|
||||
, afterFix :: IO ()
|
||||
}
|
||||
|
||||
{- The afterFix actions are assumed to all be equivilant. -}
|
||||
sameRepoProblem :: RepoProblem -> RepoProblem -> Bool
|
||||
sameRepoProblem = (==) `on` problemUUID
|
||||
|
||||
type RepoProblemChan = TList RepoProblem
|
||||
|
||||
newRepoProblemChan :: IO RepoProblemChan
|
||||
newRepoProblemChan = atomically newTList
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue