just sleep 1 second
This commit is contained in:
parent
ccc0ebd0f9
commit
c1384422c3
1 changed files with 1 additions and 5 deletions
|
@ -1711,13 +1711,9 @@ void PostgreSQL::onlineNotification_Redis()
|
||||||
|
|
||||||
fprintf(stderr, "onlineNotification ran in %llu ms\n", total);
|
fprintf(stderr, "onlineNotification ran in %llu ms\n", total);
|
||||||
|
|
||||||
if (count > 0) {
|
|
||||||
std::this_thread::yield();
|
|
||||||
} else {
|
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t PostgreSQL::_doRedisUpdate(sw::redis::Transaction &tx, std::string &controllerId,
|
uint64_t PostgreSQL::_doRedisUpdate(sw::redis::Transaction &tx, std::string &controllerId,
|
||||||
std::unordered_map< std::pair<uint64_t,uint64_t>,std::pair<int64_t,InetAddress>,_PairHasher > &lastOnline)
|
std::unordered_map< std::pair<uint64_t,uint64_t>,std::pair<int64_t,InetAddress>,_PairHasher > &lastOnline)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue