mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 00:54:30 +02:00
Reformat code
CLion is now pretty close at what we use with Icinga, other changes do make sense to me.
This commit is contained in:
parent
8f411c7475
commit
0456298c58
@ -73,7 +73,8 @@ void RedisWriter::UpdateAllConfigObjects(void)
|
|||||||
ExecuteQuery({"MULTI"});
|
ExecuteQuery({"MULTI"});
|
||||||
|
|
||||||
/* Delete obsolete object keys first. */
|
/* Delete obsolete object keys first. */
|
||||||
ExecuteQuery({"DEL", m_PrefixConfigCheckSum + lcType, m_PrefixConfigObject + lcType, m_PrefixStatusObject + lcType});
|
ExecuteQuery(
|
||||||
|
{"DEL", m_PrefixConfigCheckSum + lcType, m_PrefixConfigObject + lcType, m_PrefixStatusObject + lcType});
|
||||||
|
|
||||||
/* fetch all objects and dump them */
|
/* fetch all objects and dump them */
|
||||||
for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
|
for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
|
||||||
@ -585,7 +586,8 @@ void RedisWriter::SendStatusUpdate(const ConfigObject::Ptr& object, bool useTran
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void RedisWriter::UpdateObjectAttrs(const String& keyPrefix, const ConfigObject::Ptr& object, int fieldType, const String& typeNameOverride)
|
void RedisWriter::UpdateObjectAttrs(const String& keyPrefix, const ConfigObject::Ptr& object, int fieldType,
|
||||||
|
const String& typeNameOverride)
|
||||||
{
|
{
|
||||||
Type::Ptr type = object->GetReflectionType();
|
Type::Ptr type = object->GetReflectionType();
|
||||||
Dictionary::Ptr attrs(new Dictionary);
|
Dictionary::Ptr attrs(new Dictionary);
|
||||||
@ -635,7 +637,8 @@ void RedisWriter::VersionChangedHandler(const ConfigObject::Ptr& object)
|
|||||||
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
||||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigUpdate, rw.get(), object, true, true));
|
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigUpdate, rw.get(), object, true, true));
|
||||||
}
|
}
|
||||||
} else if (!object->IsActive() && object->GetExtension("ConfigObjectDeleted")) { /* same as in apilistener-configsync.cpp */
|
} else if (!object->IsActive() &&
|
||||||
|
object->GetExtension("ConfigObjectDeleted")) { /* same as in apilistener-configsync.cpp */
|
||||||
/* Delete object config */
|
/* Delete object config */
|
||||||
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
||||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigDelete, rw.get(), object));
|
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigDelete, rw.get(), object));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user