]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Storage.hs
Many improvements
[Rakka.git] / Rakka / Storage.hs
index 56b42da0ae57f8668685f86d1cd9bca08ebe0f60..945bfd35ca0282c1940e4727d5fd5677f7b63124 100644 (file)
@@ -10,6 +10,8 @@ module Rakka.Storage
     , putPageA
 
     , searchPages
+
+    , rebuildIndex
     )
     where
 
@@ -26,8 +28,6 @@ import           System.IO
 import           Subversion.Repository
 import           Text.HyperEstraier hiding (WriteLock)
 
-logger = "Rakka.Storage"
-
 
 mkStorage :: FilePath -> Repository -> (Page -> IO Document) -> IO Storage
 mkStorage lsdir repos mkDraft
@@ -45,7 +45,7 @@ getPage = ((liftIO .) .) . getPage' . stoRepository
 
 
 putPage :: MonadIO m => Storage -> Page -> RevNum -> m ()
-putPage sto page oldRev
+putPage _sto _page _oldRev
     = error "FIXME: not implemented"
 
 
@@ -65,6 +65,11 @@ searchPages sto cond
          atomically $ takeTMVar var
 
 
+rebuildIndex :: MonadIO m => Storage -> m ()
+rebuildIndex sto
+    = liftIO $ atomically $ writeTChan (stoIndexChan sto) RebuildIndex
+
+
 syncIndex :: Storage -> IO ()
 syncIndex sto
     = atomically $ writeTChan (stoIndexChan sto) SyncIndex