13 lines
444 B
Haskell
13 lines
444 B
Haskell
module Jobs.Handler.SetLogSettings
|
|
( dispatchJobSetLogSettings
|
|
) where
|
|
|
|
import Import
|
|
|
|
dispatchJobSetLogSettings :: InstanceId -> LogSettings -> JobHandler UniWorX
|
|
dispatchJobSetLogSettings jInstance jLogSettings = JobHandlerException $ do
|
|
instanceId <- getsYesod appInstanceID
|
|
unless (instanceId == jInstance) . liftIO $ fail "Incorrect instance"
|
|
lSettings <- getsYesod appLogSettings
|
|
atomically $ writeTVar lSettings jLogSettings
|