Commit 59ad9e51 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Silence PUBMED API output

We switch off the debug logs so that the integration tests do not get
flooded (and production alike).
parent fae729d3
Pipeline #5428 passed with stages
in 89 minutes and 40 seconds
...@@ -11,7 +11,7 @@ STORE_DIR="${1:-$DEFAULT_STORE}" ...@@ -11,7 +11,7 @@ STORE_DIR="${1:-$DEFAULT_STORE}"
# `expected_cabal_project_freeze_hash` with the # `expected_cabal_project_freeze_hash` with the
# `sha256sum` result calculated on the `cabal.project` and `cabal.project.freeze`. # `sha256sum` result calculated on the `cabal.project` and `cabal.project.freeze`.
# This ensures the files stay deterministic so that CI cache can kick in. # This ensures the files stay deterministic so that CI cache can kick in.
expected_cabal_project_hash="f2efe6832145c093cfe16832b17b06cd4e2d94e85dd0390e713c46c40ee9e461" expected_cabal_project_hash="9ffc5b4bdf07eb2e3b4ef830c0776091f6869c8b126317bf0404034608ae1fc7"
expected_cabal_project_freeze_hash="796f0109611f3381278b1885ae1fa257c4177b99885eb04701938f1107c06ee5" expected_cabal_project_freeze_hash="796f0109611f3381278b1885ae1fa257c4177b99885eb04701938f1107c06ee5"
cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-11-23T20:05:40Z' cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-11-23T20:05:40Z'
......
...@@ -109,7 +109,7 @@ source-repository-package ...@@ -109,7 +109,7 @@ source-repository-package
source-repository-package source-repository-package
type: git type: git
location: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git location: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git
tag: 234ad423fa682307ff4843ae4acd725dcc6ffc55 tag: 661966871cf105b0725352b4bd22812d66f6ea78
source-repository-package source-repository-package
type: git type: git
......
...@@ -96,13 +96,13 @@ get apiKey q l = do ...@@ -96,13 +96,13 @@ get apiKey q l = do
eRes <- runReaderT PubMed.getMetadataWithC (Config { apiKey = Just apiKey eRes <- runReaderT PubMed.getMetadataWithC (Config { apiKey = Just apiKey
, query = getRawQuery q , query = getRawQuery q
, perPage = Just 200 , perPage = Just 200
, mWebEnv = Nothing }) , mWebEnv = Nothing
, enableDebugLogs = False
})
let takeLimit = case l of let takeLimit = case l of
Nothing -> mapC identity Nothing -> mapC identity
Just l' -> takeC $ getLimit l' Just l' -> takeC $ getLimit l'
pure $ (\(len, docsC) -> (len, docsC .| takeLimit .| mapC (toDoc EN))) <$> eRes pure $ (\(len, docsC) -> (len, docsC .| takeLimit .| mapC (toDoc EN))) <$> eRes
--either (\e -> panic $ "CRAWL: PubMed" <> e) (map (toDoc EN))
-- <$> PubMed.getMetadataWithC q l
toDoc :: Lang -> PubMedDoc.PubMed -> HyperdataDocument toDoc :: Lang -> PubMedDoc.PubMed -> HyperdataDocument
toDoc l (PubMedDoc.PubMed { pubmed_id toDoc l (PubMedDoc.PubMed { pubmed_id
......
...@@ -54,7 +54,7 @@ extra-deps: ...@@ -54,7 +54,7 @@ extra-deps:
commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4 commit: 4fd2edf30c141600ffad6d730cc4c1c08a6dbce4
# External Data API connectors # External Data API connectors
- git: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git - git: https://gitlab.iscpif.fr/gargantext/crawlers/pubmed.git
commit: 234ad423fa682307ff4843ae4acd725dcc6ffc55 commit: 661966871cf105b0725352b4bd22812d66f6ea78
- git: https://gitlab.iscpif.fr/gargantext/crawlers/istex.git - git: https://gitlab.iscpif.fr/gargantext/crawlers/istex.git
commit: 9b1bd17f3ed38eab83e675bb68278922217a9c73 commit: 9b1bd17f3ed38eab83e675bb68278922217a9c73
- git: https://gitlab.iscpif.fr/gargantext/crawlers/hal.git - git: https://gitlab.iscpif.fr/gargantext/crawlers/hal.git
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment