Commit ba94617f authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Use getMasterOrCandidates



...instead of replicating the functionality on the fly.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent b0f57d82
......@@ -296,11 +296,8 @@ handleCall _ _ cfg (WaitForJobChange jid fields prev_job prev_log tmout) = do
_ -> liftM (Ok . showJSON) compute_fn
handleCall _ _ cfg (SetWatcherPause time) = do
let mcs = Config.getMasterCandidates cfg
masters = genericResult (const []) return
. Config.getNode cfg . clusterMasterNode
$ configCluster cfg
_ <- executeRpcCall (masters ++ mcs) $ RpcCallSetWatcherPause time
let mcs = Config.getMasterOrCandidates cfg
_ <- executeRpcCall mcs $ RpcCallSetWatcherPause time
return . Ok . maybe JSNull showJSON $ fmap TimeAsDoubleJSON time
handleCall _ _ cfg (SetDrainFlag value) = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment