Retry connecting to pg

This commit is contained in:
Murat Kabilov
2017-10-17 17:03:50 +02:00
committed by GitHub
parent 6c4cb4e9da
commit 202f2de988
3 changed files with 43 additions and 19 deletions
+5
View File
@@ -1,8 +1,13 @@
package constants
import "time"
// PostgreSQL specific constants
const (
DataVolumeName = "pgdata"
PostgresDataMount = "/home/postgres/pgdata"
PostgresDataPath = PostgresDataMount + "/pgroot"
PostgresConnectRetryTimeout = 2 * time.Minute
PostgresConnectTimeout = 15 * time.Second
)
+1 -1
View File
@@ -77,4 +77,4 @@ func (p *Patroni) Failover(master *v1.Pod, candidate string) error {
}
return nil
}
}