summaryrefslogtreecommitdiff
path: root/controller/PostgreSQL.cpp
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2020-07-27 18:37:45 -0700
committerGrant Limberg <[email protected]>2020-07-27 18:37:45 -0700
commit5b700fa4973029fb877b1c80b070f74e085ebd0c (patch)
tree30a7aa1b6d166dd3c56d8b6b54f30d0c6026f833 /controller/PostgreSQL.cpp
parent251b06d812357ee9ea0bd9aa8b7eeb868dad6248 (diff)
println for which notification stream the controller is listening to
Diffstat (limited to 'controller/PostgreSQL.cpp')
-rw-r--r--controller/PostgreSQL.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp
index d89b7781..0ea40455 100644
--- a/controller/PostgreSQL.cpp
+++ b/controller/PostgreSQL.cpp
@@ -795,6 +795,7 @@ void PostgreSQL::membersDbWatcher()
void PostgreSQL::_membersWatcher_Postgres(PGconn *conn) {
char buf[11] = {0};
std::string cmd = "LISTEN member_" + std::string(_myAddress.toString(buf));
+ fprintf(stderr, "Listening to member stream: %s\n", cmd.c_str());
PGresult *res = PQexec(conn, cmd.c_str());
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
fprintf(stderr, "LISTEN command failed: %s\n", PQresultErrorMessage(res));
@@ -836,7 +837,7 @@ void PostgreSQL::_membersWatcher_Postgres(PGconn *conn) {
void PostgreSQL::_membersWatcher_Redis() {
char buf[11] = {0};
std::string key = "member-stream:{" + std::string(_myAddress.toString(buf)) + "}";
-
+ fprintf(stderr, "Listening to member stream: %s\n", key.c_str());
while (_run == 1) {
try {
json tmp;