diff Framework/MySQL/MySQLParameters.h @ 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/MySQL/MySQLParameters.h	Fri Jan 31 17:24:29 2020 +0100
+++ b/Framework/MySQL/MySQLParameters.h	Mon Feb 03 22:29:51 2020 +0100
@@ -39,6 +39,8 @@
     uint16_t     port_;
     std::string  unixSocket_;
     bool         lock_;
+    unsigned int maxConnectionRetries_;
+    unsigned int connectionRetryInterval_;
 
     void Reset();
 
@@ -99,6 +101,16 @@
       return lock_;
     }
 
+    unsigned int GetMaxConnectionRetries() const
+    {
+      return maxConnectionRetries_;
+    }
+
+    unsigned int GetConnectionRetryInterval() const
+    {
+      return connectionRetryInterval_;
+    }
+
     void Format(Json::Value& target) const;
   };
 }