add runtime flag for enabling k-choices or not
any value except "off" means on contributes to #2
This commit is contained in:
parent
13c5b385b1
commit
62da66aade
3 changed files with 29 additions and 21 deletions
|
@ -26,7 +26,7 @@ main = do
|
|||
|
||||
readConfig :: IO (FediChordConf, ServiceConf)
|
||||
readConfig = do
|
||||
confDomainString : ipString : portString : servicePortString : speedupString : remainingArgs <- getArgs
|
||||
confDomainString : ipString : portString : servicePortString : speedupString : loadBalancingEnabled : remainingArgs <- getArgs
|
||||
-- allow starting the initial node without bootstrapping info to avoid
|
||||
-- waiting for timeout
|
||||
let
|
||||
|
@ -48,6 +48,7 @@ readConfig = do
|
|||
, confResponsePurgeAge = 60 / fromIntegral speedup
|
||||
, confRequestTimeout = 5 * 10^6 `div` speedup
|
||||
, confRequestRetries = 3
|
||||
, confEnableKChoices = loadBalancingEnabled /= "off"
|
||||
}
|
||||
sConf = ServiceConf
|
||||
{ confSubscriptionExpiryTime = 24*3600 / fromIntegral speedup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue