mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-22 00:41:56 +01:00
Remove the timeouts, hope for the best
This commit is contained in:
parent
dcb1485e50
commit
54e475e43e
@ -80,15 +80,13 @@ packagePage mspi pname =
|
|||||||
mspi' <-
|
mspi' <-
|
||||||
case mspi of
|
case mspi of
|
||||||
Just spi -> pure $ Just spi
|
Just spi -> pure $ Just spi
|
||||||
Nothing ->
|
Nothing -> getSnapshotPackageLatestVersion pname
|
||||||
fmap join $ timeout 2000000 $ getSnapshotPackageLatestVersion pname
|
|
||||||
case mspi' of
|
case mspi' of
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
mmhci <- timeout 2000000 $ run $ getHackageLatestVersion pname
|
mhci <- run $ getHackageLatestVersion pname
|
||||||
case mmhci of
|
case mhci of
|
||||||
Nothing -> error "Getting latest version timed out"
|
Nothing -> notFound
|
||||||
Just Nothing -> notFound
|
(Just hci) -> handlePackage $ Left hci
|
||||||
Just (Just hci) -> handlePackage $ Left hci
|
|
||||||
Just spi -> handlePackage $ Right spi
|
Just spi -> handlePackage $ Right spi
|
||||||
|
|
||||||
|
|
||||||
@ -97,14 +95,13 @@ handlePackage epi = do
|
|||||||
(isDeprecated, inFavourOf, snapInfo, PackageInfo{..}) <- do
|
(isDeprecated, inFavourOf, snapInfo, PackageInfo{..}) <- do
|
||||||
(isDeprecated, inFavourOf) <- run $ getDeprecatedQuery pname
|
(isDeprecated, inFavourOf) <- run $ getDeprecatedQuery pname
|
||||||
snapInfo <- case epi of
|
snapInfo <- case epi of
|
||||||
Right spi -> Right <$> timeout 2000000 (run $ getSnapshotPackagePageInfoQuery spi maxDisplayedDeps)
|
Right spi -> Right <$> run (getSnapshotPackagePageInfoQuery spi maxDisplayedDeps)
|
||||||
Left hci -> pure $ Left hci
|
Left hci -> pure $ Left hci
|
||||||
pinfo <- run $ getPackageInfoQuery epi
|
pinfo <- run $ getPackageInfoQuery epi
|
||||||
pure (isDeprecated, inFavourOf, snapInfo, pinfo)
|
pure (isDeprecated, inFavourOf, snapInfo, pinfo)
|
||||||
(msppi, mhciLatest) <- case snapInfo of
|
(msppi, mhciLatest) <- case snapInfo of
|
||||||
Left hci -> pure (Nothing, Just hci)
|
Left hci -> pure (Nothing, Just hci)
|
||||||
Right (Just sppi) -> pure (Just sppi, sppiLatestHackageCabalInfo sppi)
|
Right sppi -> pure (Just sppi, sppiLatestHackageCabalInfo sppi)
|
||||||
Right Nothing -> pure (Nothing, Nothing)
|
|
||||||
let authors = enumerate piAuthors
|
let authors = enumerate piAuthors
|
||||||
maintainers =
|
maintainers =
|
||||||
let ms = enumerate piMaintainers
|
let ms = enumerate piMaintainers
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user