mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-06 13:24:28 +02:00
Code formatting
This commit is contained in:
parent
1d21626b30
commit
36588ce31a
@ -76,10 +76,12 @@ void RedisWriter::UpdateAllConfigObjects()
|
|||||||
|
|
||||||
String lcType(type->GetName().ToLower());
|
String lcType(type->GetName().ToLower());
|
||||||
types.emplace_back(ctype, lcType);
|
types.emplace_back(ctype, lcType);
|
||||||
m_Rcon->ExecuteQuery({"DEL", m_PrefixConfigCheckSum + lcType, m_PrefixConfigObject + lcType, m_PrefixStatusObject + lcType});
|
m_Rcon->ExecuteQuery(
|
||||||
|
{"DEL", m_PrefixConfigCheckSum + lcType, m_PrefixConfigObject + lcType, m_PrefixStatusObject + lcType});
|
||||||
}
|
}
|
||||||
|
|
||||||
upq.ParallelFor(types, [this](const TypePair& type) {
|
upq.ParallelFor(types, [this](const TypePair& type)
|
||||||
|
{
|
||||||
size_t bulkCounter = 0;
|
size_t bulkCounter = 0;
|
||||||
auto attributes = std::vector<String>({"HMSET", m_PrefixConfigObject + type.second});
|
auto attributes = std::vector<String>({"HMSET", m_PrefixConfigObject + type.second});
|
||||||
auto customVars = std::vector<String>({"HMSET", m_PrefixConfigCustomVar + type.second});
|
auto customVars = std::vector<String>({"HMSET", m_PrefixConfigCustomVar + type.second});
|
||||||
@ -154,7 +156,9 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool runtime
|
|||||||
* (if applicable), first the key then the value. To use in a Redis command the command (e.g. HSET) and the key (e.g.
|
* (if applicable), first the key then the value. To use in a Redis command the command (e.g. HSET) and the key (e.g.
|
||||||
* icinga:config:object:downtime) need to be prepended. There is nothing to indicate success or failure.
|
* icinga:config:object:downtime) need to be prepended. There is nothing to indicate success or failure.
|
||||||
*/
|
*/
|
||||||
void RedisWriter::CreateConfigUpdate(const ConfigObject::Ptr& object, std::vector<String>& attributes, std::vector<String>& customVars, std::vector<String>& checksums, bool runtimeUpdate)
|
void RedisWriter::CreateConfigUpdate(const ConfigObject::Ptr& object, std::vector<String>& attributes,
|
||||||
|
std::vector<String>& customVars, std::vector<String>& checksums,
|
||||||
|
bool runtimeUpdate)
|
||||||
{
|
{
|
||||||
/* TODO: This isn't essentially correct as we don't keep track of config objects ourselves. This would avoid duplicated config updates at startup.
|
/* TODO: This isn't essentially correct as we don't keep track of config objects ourselves. This would avoid duplicated config updates at startup.
|
||||||
if (!runtimeUpdate && m_ConfigDumpInProgress)
|
if (!runtimeUpdate && m_ConfigDumpInProgress)
|
||||||
@ -592,7 +596,8 @@ void RedisWriter::SendStatusUpdate(const ConfigObject::Ptr& object)
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<String> RedisWriter::UpdateObjectAttrs(const String& keyPrefix, const ConfigObject::Ptr& object, int fieldType,
|
std::vector<String>
|
||||||
|
RedisWriter::UpdateObjectAttrs(const String& keyPrefix, const ConfigObject::Ptr& object, int fieldType,
|
||||||
const String& typeNameOverride)
|
const String& typeNameOverride)
|
||||||
{
|
{
|
||||||
Type::Ptr type = object->GetReflectionType();
|
Type::Ptr type = object->GetReflectionType();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user