From 465a92b9829db9a9969cf370c635bbf9407f07f5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 May 2022 20:47:42 +0200 Subject: [PATCH] feat(app-settings): add duration after which finalized WorkflowWorkflows will be archived --- config/settings.yml | 2 ++ src/Settings.hs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/config/settings.yml b/config/settings.yml index 89ee33642..d8d6e6534 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -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 diff --git a/src/Settings.hs b/src/Settings.hs index 094386068..1195e1578 100644 --- a/src/Settings.hs +++ b/src/Settings.hs @@ -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