Improve reconnection policy and context handling in Queryx
This commit is contained in:
committed by
Sylwia Szunejko
parent
2f79f86b7c
commit
fd84cf32de
@@ -51,6 +51,10 @@ func CreateCluster() *gocql.ClusterConfig {
|
||||
cluster.Timeout = *flagTimeout
|
||||
cluster.Consistency = gocql.Quorum
|
||||
cluster.MaxWaitSchemaAgreement = 2 * time.Minute // travis might be slow
|
||||
cluster.ReconnectionPolicy = &gocql.ConstantReconnectionPolicy{
|
||||
MaxRetries: 10,
|
||||
Interval: 3 * time.Second,
|
||||
}
|
||||
if *flagRetry > 0 {
|
||||
cluster.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: *flagRetry}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user