mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Re-enable view generation
This commit is contained in:
parent
38850dfe68
commit
1d49985c37
@ -37,6 +37,7 @@ import Yesod.Default.Main
|
||||
import System.Environment (getEnvironment)
|
||||
import Data.BlobStore (HasBlobStore (..), BlobStore)
|
||||
import System.IO (hSetBuffering, BufferMode (LineBuffering))
|
||||
import qualified Data.ByteString as S
|
||||
|
||||
import qualified Echo
|
||||
|
||||
@ -230,7 +231,7 @@ cabalLoaderMain = do
|
||||
pool
|
||||
where
|
||||
logFunc loc src level str
|
||||
| level > LevelDebug = hPutStrLn stdout $ fromLogStr $ defaultLogStr loc src level str
|
||||
| level > LevelDebug = S.hPutStr stdout $ fromLogStr $ defaultLogStr loc src level str
|
||||
| otherwise = return ()
|
||||
|
||||
appLoadCabalFiles :: ( PersistConfig c
|
||||
@ -264,18 +265,18 @@ appLoadCabalFiles env dbconf p = do
|
||||
runDB' $ forM_ newMD $ \x -> do
|
||||
deleteBy $ UniqueMetadata $ metadataName x
|
||||
insert_ x
|
||||
{-
|
||||
let views =
|
||||
[ ("pvp", viewPVP uploadHistory)
|
||||
, ("no-bounds", viewNoBounds)
|
||||
, ("unchanged", viewUnchanged)
|
||||
]
|
||||
forM_ views $ \(name, func) -> runResourceT $ createView
|
||||
forM_ views $ \(name, func) -> do
|
||||
$logInfo $ "Generating view: " ++ toPathPiece name
|
||||
runResourceT $ createView
|
||||
name
|
||||
func
|
||||
(sourceHistory uploadHistory)
|
||||
(storeWrite $ HackageViewIndex name)
|
||||
-}
|
||||
case eres of
|
||||
Left e -> $logError $ tshow e
|
||||
Right () -> return ()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user