Mercurial > hg > orthanc-databases
diff Framework/PostgreSQL/PostgreSQLParameters.cpp @ 141:0b3e9ee53c46
Added 'MaximumConnectionRetries' & 'ConnectionRetryInterval' to configure the retries when connecting to the DB at startup
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 03 Feb 2020 22:29:51 +0100 |
parents | 4cd7e45b671e |
children | 063aa53b5917 |
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLParameters.cpp Fri Jan 31 17:24:29 2020 +0100 +++ b/Framework/PostgreSQL/PostgreSQLParameters.cpp Mon Feb 03 22:29:51 2020 +0100 @@ -39,6 +39,8 @@ uri_.clear(); ssl_ = false; lock_ = true; + maxConnectionRetries_ = 10; + connectionRetryInterval_ = 5; } @@ -90,6 +92,9 @@ } lock_ = configuration.GetBooleanValue("Lock", true); // Use locking by default + + maxConnectionRetries_ = configuration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10); + connectionRetryInterval_ = configuration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5); }