initial-quantum
This commit is contained in:
1 parent
813d3aa06e
commit
ae1ce9673a
6924 files changed
+1908770
-17453
No files matched your search
@@ -199,8 +199,13 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
}
|
||||
const char *redisMemberStatus = getenv("ZT_REDIS_MEMBER_STATUS");
|
||||
if (redisMemberStatus && (strcmp(redisMemberStatus, "true") == 0)) {
|
||||
_redisMemberStatus = true;
|
||||
fprintf(stderr, "Using redis for member status\n");
|
||||
if (_rc != NULL) {
|
||||
_redisMemberStatus = true;
|
||||
fprintf(stderr, "Using redis for member status\n");
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "ZT_REDIS_MEMBER_STATUS=true ignored: no settings.redis config\n");
|
||||
}
|
||||
}
|
||||
|
||||
auto c = _pool->borrow();
|
||||
@@ -222,7 +227,7 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
opts.host = _rc->hostname;
|
||||
opts.port = _rc->port;
|
||||
opts.password = _rc->password;
|
||||
opts.db = 0;
|
||||
opts.db = _rc->clusterMode ? 0 : _rc->db;
|
||||
opts.keep_alive = true;
|
||||
opts.connect_timeout = std::chrono::seconds(3);
|
||||
poolOpts.size = 25;
|
||||
@@ -1063,7 +1068,7 @@ void PostgreSQL::initializeMembers()
|
||||
|
||||
void PostgreSQL::heartbeat()
|
||||
{
|
||||
char publicId[1024];
|
||||
char publicId[ZT_IDENTITY_STRING_BUFFER_LENGTH];
|
||||
char hostnameTmp[1024];
|
||||
_myId.toString(false,publicId);
|
||||
if (gethostname(hostnameTmp, sizeof(hostnameTmp))!= 0) {
|
||||
|
||||
Reference in new issue
Block a user