mirror of https://github.com/Icinga/icinga2.git
parent
74eccf60f2
commit
bb333b535b
|
@ -189,12 +189,10 @@ void RedisConnection::ExecuteQuery(const std::vector<String>& query, redisCallba
|
|||
void
|
||||
RedisConnection::ExecuteQueries(const std::vector<std::vector<String> >& queries, redisCallbackFn *fn, void *privdata)
|
||||
{
|
||||
for (const auto& query : queries) {
|
||||
m_RedisConnectionWorkQueue.Enqueue([this, query, fn, privdata]() {
|
||||
SendMessageInternal(query, fn, privdata);
|
||||
m_RedisConnectionWorkQueue.Enqueue([this, queries, fn, privdata]() {
|
||||
SendMessagesInternal(queries, fn, privdata);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void RedisConnection::SendMessageInternal(const std::vector<String>& query, redisCallbackFn *fn, void *privdata)
|
||||
{
|
||||
|
@ -248,3 +246,10 @@ void RedisConnection::SendMessageInternal(const std::vector<String>& query, redi
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
void RedisConnection::SendMessagesInternal(const std::vector<std::vector<String>>& queries, redisCallbackFn *fn, void *privdata)
|
||||
{
|
||||
for (const auto& query : queries) {
|
||||
SendMessageInternal(query, fn, privdata);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ namespace icinga
|
|||
static void StaticInitialize();
|
||||
|
||||
void SendMessageInternal(const std::vector<String>& query, redisCallbackFn *fn, void *privdata);
|
||||
void SendMessagesInternal(const std::vector<std::vector<String>>& queries, redisCallbackFn *fn, void *privdata);
|
||||
|
||||
void AssertOnWorkQueue();
|
||||
|
||||
|
|
Loading…
Reference in New Issue