mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-14 08:05:40 +03:00
Add support for forward-env in BackgroundConfig
This commit is contained in:
parent
46f5eaad89
commit
54bf1d3845
@ -409,6 +409,7 @@ data BackgroundConfig = BackgroundConfig
|
||||
, bgconfigEnvironment :: !(Map Text Text)
|
||||
, bgconfigRestartCount :: !RestartCount
|
||||
, bgconfigRestartDelaySeconds :: !Word
|
||||
, bgconfigForwardEnv :: !(Set Text)
|
||||
}
|
||||
deriving Show
|
||||
|
||||
@ -426,6 +427,7 @@ instance ParseYamlFile BackgroundConfig where
|
||||
<*> o .:? "env" .!= Map.empty
|
||||
<*> o .:? "restart-count" .!= UnlimitedRestarts
|
||||
<*> o .:? "restart-delay-seconds" .!= 5
|
||||
<*> o .:? "forward-env" .!= Set.empty
|
||||
|
||||
instance ToJSON BackgroundConfig where
|
||||
toJSON BackgroundConfig {..} = object $ catMaybes
|
||||
@ -436,4 +438,5 @@ instance ToJSON BackgroundConfig where
|
||||
UnlimitedRestarts -> Nothing
|
||||
LimitedRestarts count -> Just $ "restart-count" .= count
|
||||
, Just $ "restart-delay-seconds" .= bgconfigRestartDelaySeconds
|
||||
, Just $ "forward-env" .= bgconfigForwardEnv
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user