-- | Force the distribution of configuration without actually modifying it.
--
-- We need a separate call for this operation, because 'modifyConfigState' only
-- triggers the distribution when the configuration changes.
forceConfigStateDistribution :: WConfdMonad ()
forceConfigStateDistribution  = do
  logDebug "Forcing synchronous config write together with full distribution"
  dh <- daemonHandle
  liftBase . triggerAndWait (Any True) . dhSaveConfigWorker $ dh
  logDebug "Forced config write and distribution finished"

-- | Atomically modifies the configuration data in the WConfdMonad
-- with a computation that can possibly fail.
forceConfigStateDistribution :: WConfdMonad ()
forceConfigStateDistribution  = do
  logDebug "Forcing synchronous config write together with full distribution"
  dh <- daemonHandle
  liftBase . triggerAndWait (Any True) . dhSaveConfigWorker $ dh
  logDebug "Forced config write and distribution finished"

-- | Atomically modifies the configuration data in the WConfdMonad
-- with a computation that can possibly fail.
forceConfigStateDistribution  = do
  logDebug "Forcing synchronous config write together with full distribution"
  dh <- daemonHandle
  liftBase . triggerAndWait (Any True) . dhSaveConfigWorker $ dh
  logDebug "Forced config write and distribution finished"

-- | Atomically modifies the configuration data in the WConfdMonad
-- with a computation that can possibly fail.