feat(app-settings): add duration after which finalized WorkflowWorkflows will be archived

This commit is contained in:
Sarah Vaupel 2022-05-13 20:47:42 +02:00 committed by Sarah Vaupel
parent 088c2f5c75
commit 465a92b982
2 changed files with 6 additions and 0 deletions

View File

@ -295,3 +295,5 @@ bot-mitigations:
volatile-cluster-settings-cache-time: 10
communication-attachments-max-size: 20971520 # 20MiB
workflow-workflow-archive-after: 5270400 # 61 days

View File

@ -228,6 +228,8 @@ data AppSettings = AppSettings
, appJobMaxFlush :: Maybe Natural
, appCommunicationAttachmentsMaxSize :: Maybe Natural
, appWorkflowWorkflowArchiveAfter :: Maybe NominalDiffTime
} deriving Show
data JobMode = JobsLocal { jobsAcceptOffload :: Bool }
@ -700,6 +702,8 @@ instance FromJSON AppSettings where
appCommunicationAttachmentsMaxSize <- o .:? "communication-attachments-max-size"
appWorkflowWorkflowArchiveAfter <- o .:? "workflow-workflow-archive-after"
return AppSettings{..}
where isValidARCConf ARCConf{..} = arccMaximumWeight > 0