X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FStorage.hs;h=55037f03712294efac4ec84c9565b0e8aab62882;hb=9681bedbfde02fa1bcda4fbbacba941378c7a57a;hp=56b42da0ae57f8668685f86d1cd9bca08ebe0f60;hpb=126e9f3faff19add1fb3dea792ec10dc57c30f03;p=Rakka.git diff --git a/Rakka/Storage.hs b/Rakka/Storage.hs index 56b42da..55037f0 100644 --- a/Rakka/Storage.hs +++ b/Rakka/Storage.hs @@ -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 @@ -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