1 {-# LANGUAGE TemplateHaskell #-}
3 module Gargantext.Utils.Jobs.Settings where
8 import qualified Servant.Job.Core as SJ
10 -- | A few control knobs for the job system.
11 data JobSettings = JobSettings
13 , jsJobTimeout :: Int -- in seconds. TODO: timeout per job type? Map t Int
14 , jsIDTimeout :: Int -- in seconds, how long a job ID is valid
15 , jsGcPeriod :: Int -- in seconds, how long between each GC
16 , jsSecretKey :: SJ.SecretKey
19 makeLensesFor [ ("jsJobTimeout", "l_jsJobTimeout")
20 , ("jsIDTimeout", "l_jsIDTimeout")] ''JobSettings