[toml] remove js_job_timeout/js_id_timeout as there aren't used

parent ae6685ad
......@@ -79,9 +79,7 @@ convertConfigs ini@(Ini.GargConfig { .. }) iniMail nlpConfig connInfo =
, _f_searx_url = _gc_frame_searx_url
, _f_istex_url = _gc_frame_istex_url }
, _gc_jobs = CTypes.JobsConfig { _jc_max_docs_parsers = _gc_max_docs_parsers
, _jc_max_docs_scrapers = _gc_max_docs_scrapers
, _jc_js_job_timeout = _gc_js_job_timeout
, _jc_js_id_timeout = _gc_js_id_timeout }
, _jc_max_docs_scrapers = _gc_max_docs_scrapers }
, _gc_apis = CTypes.APIsConfig { _ac_epo_api_url = _gc_epo_api_url
, _ac_scrapyd_url }
, _gc_worker = WorkerSettings { _wsDefinitions = [ wd ]
......
......@@ -89,10 +89,6 @@ istex_url = URL_TO_CHANGE
max_docs_parsers = 4000
max_docs_scrapers = 4000
# in seconds
js_job_timeout = 6000
js_id_timeout = 6000
[database]
# PostgreSQL access
......
......@@ -153,9 +153,6 @@ newEnv logger config dispatcher = do
let !nodeStory_env = mkNodeStoryEnv
-- secret <- Jobs.genSecret
-- let jobs_settings = (Jobs.defaultJobSettings 1 secret)
-- & Jobs.l_jsJobTimeout .~ (fromIntegral $ config_env ^. hasConfig ^. gc_jobs . jc_js_job_timeout)
-- & Jobs.l_jsIDTimeout .~ (fromIntegral $ config_env ^. hasConfig ^. gc_jobs . jc_js_id_timeout)
!_env_jwt_settings <- jwtSettings (_gc_secrets config)
......
......@@ -41,8 +41,6 @@ module Gargantext.Core.Config.Types
, JobsConfig(..)
, jc_max_docs_parsers
, jc_max_docs_scrapers
, jc_js_job_timeout
, jc_js_id_timeout
, MicroServicesSettings(..)
, NotificationsConfig(..)
, JWKFile(..)
......@@ -290,24 +288,19 @@ jwtSettings (SecretsConfig { _s_jwk_file = JWKFile jwkFile }) = do
data JobsConfig =
JobsConfig { _jc_max_docs_parsers :: !Integer
, _jc_max_docs_scrapers :: !Integer
, _jc_js_job_timeout :: !Integer
, _jc_js_id_timeout :: !Integer }
, _jc_max_docs_scrapers :: !Integer }
deriving (Generic, Show)
instance FromValue JobsConfig where
fromValue = parseTableFromValue $ do
_jc_max_docs_parsers <- reqKey "max_docs_parsers"
_jc_max_docs_scrapers <- reqKey "max_docs_scrapers"
_jc_js_job_timeout <- reqKey "js_job_timeout"
_jc_js_id_timeout <- reqKey "js_id_timeout"
return $ JobsConfig { .. }
instance ToValue JobsConfig where
toValue = defaultTableToValue
instance ToTable JobsConfig where
toTable (JobsConfig { .. }) = table [ "max_docs_parsers" .= _jc_max_docs_parsers
, "max_docs_scrapers" .= _jc_max_docs_scrapers
, "js_job_timeout" .= _jc_js_job_timeout
, "js_id_timeout" .= _jc_js_id_timeout ]
toTable (JobsConfig { .. }) =
table [ "max_docs_parsers" .= _jc_max_docs_parsers
, "max_docs_scrapers" .= _jc_max_docs_scrapers ]
makeLenses ''JobsConfig
......
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