mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-03-16 01:46:44 +01:00
Remove scary "handleAny"
Simply let the process die on exception. It's a one-shot process that gets run on a timer, anyway.
This commit is contained in:
parent
885dd2a01e
commit
608cf0f4f6
@ -815,13 +815,14 @@ buildAndUploadHoogleDB doNotUpload = do
|
||||
uploadHoogleDB dest (ObjectKey key)
|
||||
void $ insertH snapshotId
|
||||
|
||||
-- | Create a hoogle db from haddocks for the given snapshot, and upload it to
|
||||
-- the haddock bucket.
|
||||
-- | Create a hoogle db from haddocks for the given snapshot.
|
||||
--
|
||||
-- Haddocks are downloaded from the documentation bucket, where they were
|
||||
-- uploaded as a tar file.
|
||||
--
|
||||
-- Returns the path to the .hoo database.
|
||||
createHoogleDB :: SnapshotId -> SnapName -> RIO StackageCron (Maybe FilePath)
|
||||
createHoogleDB snapshotId snapName =
|
||||
-- FIXME: this handles *any* exception, which means it will swallow most
|
||||
-- signals
|
||||
handleAny logException $ do
|
||||
createHoogleDB snapshotId snapName = do
|
||||
logInfo $ "Creating Hoogle DB for " <> display snapName
|
||||
downloadBucketUrl <- scDownloadBucketUrl <$> ask
|
||||
let root = "hoogle-gen"
|
||||
@ -858,10 +859,6 @@ createHoogleDB snapshotId snapName =
|
||||
liftIO $ Hoogle.hoogle args
|
||||
logInfo "Merge done"
|
||||
return $ Just outname
|
||||
where
|
||||
logException exc =
|
||||
logError ("Problem creating hoogle db for " <> display snapName <> ": " <> displayShow exc) $>
|
||||
Nothing
|
||||
|
||||
|
||||
-- | Grabs hoogle txt file from the tarball and a matching cabal file from pantry. Writes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user