mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Force using only latest Hoogle DBs
This commit is contained in:
parent
4e7e62c3dc
commit
68fa14a4bb
@ -23,7 +23,12 @@ getHoogleDB name = track "Handler.Hoogle.getHoogleDB" do
|
||||
liftIO $ appGetHoogleDB app name
|
||||
|
||||
getHoogleR :: SnapName -> Handler Html
|
||||
getHoogleR name = track "Handler.Hoogle.getHoogleR" do
|
||||
getHoogleR name0 = track "Handler.Hoogle.getHoogleR" do
|
||||
let branch =
|
||||
case name0 of
|
||||
SNLts _ _ -> LtsBranch
|
||||
SNNightly _ -> NightlyBranch
|
||||
name <- newestSnapshot branch >>= maybe notFound return
|
||||
Entity _ snapshot <- lookupSnapshot name >>= maybe notFound return
|
||||
mquery <- lookupGetParam "q"
|
||||
mPackageName <- lookupGetParam "package"
|
||||
|
||||
@ -229,6 +229,7 @@ runStackageUpdate doNotUpload = do
|
||||
runConduit $ sourceSnapshots .| foldMC (createOrUpdateSnapshot corePackageGetters) (pure ())
|
||||
unless doNotUpload uploadSnapshotsJSON
|
||||
buildAndUploadHoogleDB doNotUpload
|
||||
logInfo "Finished building and uploading Hoogle DBs"
|
||||
run $ mapM_ (`rawExecute` []) ["TRUNCATE TABLE latest_version", "COMMIT", "VACUUM", "BEGIN"]
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user