@@ -354,7 +354,7 @@ void IcingaDB::UpdateAllConfigObjects()
354354 auto checkable (dynamic_pointer_cast<Checkable>(object));
355355
356356 if (checkable && checkable->GetEnableActiveChecks ()) {
357- EnqueueConfigObject (checkable, NextUpdate);
357+ EnqueueConfigObject (checkable, icingadb::task_queue:: NextUpdate);
358358 }
359359 }
360360
@@ -1334,15 +1334,15 @@ void IcingaDB::UpdateState(const Checkable::Ptr& checkable, uint32_t mode)
13341334 String checksum = HashValue (stateAttrs);
13351335
13361336 auto [redisStateKey, redisChecksumKey] = GetCheckableStateKeys (checkable->GetReflectionType ());
1337- if (mode & VolatileState) {
1337+ if (mode & icingadb::task_queue:: VolatileState) {
13381338 String objectKey = GetObjectIdentifier (checkable);
13391339 m_RconWorker->FireAndForgetQueries ({
13401340 {" HSET" , redisStateKey, objectKey, JsonEncode (stateAttrs)},
13411341 {" HSET" , redisChecksumKey, objectKey, JsonEncode (new Dictionary ({{" checksum" , checksum}}))},
13421342 });
13431343 }
13441344
1345- if (mode & RuntimeState) {
1345+ if (mode & icingadb::task_queue:: RuntimeState) {
13461346 ObjectLock olock (stateAttrs);
13471347
13481348 RedisConnection::Query streamadd ({
@@ -1815,7 +1815,7 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
18151815
18161816 auto [configStateKey, checksumStateKey] = GetCheckableStateKeys (checkable->GetReflectionType ());
18171817 EnqueueRelationsDeletion (GetObjectIdentifier (checkable), {{configStateKey, checksumStateKey}});
1818- EnqueueConfigObject (object, ConfigDelete | NextUpdate); // Send also ZREM for next update
1818+ EnqueueConfigObject (object, icingadb::task_queue:: ConfigDelete | icingadb::task_queue:: NextUpdate); // Send also ZREM for next update
18191819
18201820 if (service) {
18211821 SendGroupsChanged<ServiceGroup>(checkable, service->GetGroups (), nullptr );
@@ -1826,7 +1826,7 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
18261826 return ;
18271827 }
18281828
1829- EnqueueConfigObject (object, ConfigDelete);
1829+ EnqueueConfigObject (object, icingadb::task_queue:: ConfigDelete);
18301830
18311831 if (type == TimePeriod::TypeInstance) {
18321832 TimePeriod::Ptr timeperiod = static_pointer_cast<TimePeriod>(object);
@@ -1888,7 +1888,7 @@ void IcingaDB::SendStateChange(const ConfigObject::Ptr& object, const CheckResul
18881888
18891889 tie (host, service) = GetHostService (checkable);
18901890
1891- EnqueueConfigObject (checkable, RuntimeState);
1891+ EnqueueConfigObject (checkable, icingadb::task_queue:: RuntimeState);
18921892
18931893 int hard_state{};
18941894 if (!cr) {
@@ -2069,7 +2069,7 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
20692069 return ;
20702070 }
20712071
2072- EnqueueConfigObject (downtime, ConfigUpdate);
2072+ EnqueueConfigObject (downtime, icingadb::task_queue:: ConfigUpdate);
20732073
20742074 auto checkable (downtime->GetCheckable ());
20752075 auto triggeredBy (Downtime::GetByName (downtime->GetTriggeredBy ()));
@@ -2079,7 +2079,7 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
20792079 tie (host, service) = GetHostService (checkable);
20802080
20812081 /* Update checkable state as in_downtime may have changed. */
2082- EnqueueConfigObject (checkable, FullState);
2082+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
20832083
20842084 RedisConnection::Query xAdd ({
20852085 " XADD" , " icinga:history:stream:downtime" , " *" ,
@@ -2168,7 +2168,7 @@ void IcingaDB::SendRemovedDowntime(const Downtime::Ptr& downtime)
21682168 return ;
21692169
21702170 /* Update checkable state as in_downtime may have changed. */
2171- EnqueueConfigObject (checkable, FullState);
2171+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
21722172
21732173 RedisConnection::Query xAdd ({
21742174 " XADD" , " icinga:history:stream:downtime" , " *" ,
@@ -2257,7 +2257,7 @@ void IcingaDB::SendAddedComment(const Comment::Ptr& comment)
22572257 tie (host, service) = GetHostService (checkable);
22582258
22592259 // Update the checkable state to so that the "last_comment_id" is correctly reflected.
2260- EnqueueConfigObject (checkable, FullState);
2260+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
22612261
22622262 RedisConnection::Query xAdd ({
22632263 " XADD" , " icinga:history:stream:comment" , " *" ,
@@ -2331,7 +2331,7 @@ void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
23312331 tie (host, service) = GetHostService (checkable);
23322332
23332333 // Update the checkable state to so that the "last_comment_id" is correctly reflected.
2334- EnqueueConfigObject (checkable, FullState);
2334+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
23352335
23362336 RedisConnection::Query xAdd ({
23372337 " XADD" , " icinga:history:stream:comment" , " *" ,
@@ -2488,7 +2488,7 @@ void IcingaDB::SendAcknowledgementSet(const Checkable::Ptr& checkable, const Str
24882488 tie (host, service) = GetHostService (checkable);
24892489
24902490 /* Update checkable state as is_acknowledged may have changed. */
2491- EnqueueConfigObject (checkable, FullState);
2491+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
24922492
24932493 RedisConnection::Query xAdd ({
24942494 " XADD" , " icinga:history:stream:acknowledgement" , " *" ,
@@ -2546,7 +2546,7 @@ void IcingaDB::SendAcknowledgementCleared(const Checkable::Ptr& checkable, const
25462546 tie (host, service) = GetHostService (checkable);
25472547
25482548 /* Update checkable state as is_acknowledged may have changed. */
2549- EnqueueConfigObject (checkable, FullState);
2549+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
25502550
25512551 RedisConnection::Query xAdd ({
25522552 " XADD" , " icinga:history:stream:acknowledgement" , " *" ,
@@ -2965,7 +2965,7 @@ void IcingaDB::ReachabilityChangeHandler(const std::set<Checkable::Ptr>& childre
29652965{
29662966 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
29672967 for (auto & checkable : children) {
2968- rw->EnqueueConfigObject (checkable, FullState);
2968+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
29692969 for (const auto & dependencyGroup : checkable->GetDependencyGroups ()) {
29702970 rw->EnqueueDependencyGroupStateUpdate (dependencyGroup);
29712971 }
@@ -2986,7 +2986,7 @@ void IcingaDB::VersionChangedHandler(const ConfigObject::Ptr& object)
29862986 if (object->IsActive ()) {
29872987 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
29882988 // A runtime config change triggers also a full state update as well as next update event.
2989- rw->EnqueueConfigObject (object, ConfigUpdate | FullState | NextUpdate);
2989+ rw->EnqueueConfigObject (object, icingadb::task_queue:: ConfigUpdate | icingadb::task_queue:: FullState | icingadb::task_queue:: NextUpdate);
29902990 }
29912991 } else if (!object->IsActive () && object->GetExtension (" ConfigObjectDeleted" )) { // same as in apilistener-configsync.cpp
29922992 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
@@ -3050,21 +3050,21 @@ void IcingaDB::FlappingChangeHandler(const Checkable::Ptr& checkable, double cha
30503050void IcingaDB::NewCheckResultHandler (const Checkable::Ptr& checkable)
30513051{
30523052 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3053- rw->EnqueueConfigObject (checkable, VolatileState);
3053+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: VolatileState);
30543054 }
30553055}
30563056
30573057void IcingaDB::NextCheckChangedHandler (const Checkable::Ptr& checkable)
30583058{
30593059 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3060- rw->EnqueueConfigObject (checkable, VolatileState | NextUpdate);
3060+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: VolatileState | icingadb::task_queue:: NextUpdate);
30613061 }
30623062}
30633063
30643064void IcingaDB::DependencyGroupChildRegisteredHandler (const Checkable::Ptr& child, const DependencyGroup::Ptr& dependencyGroup)
30653065{
30663066 for (const auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3067- rw->EnqueueConfigObject (child, FullState); // Child requires a full state update.
3067+ rw->EnqueueConfigObject (child, icingadb::task_queue:: FullState); // Child requires a full state update.
30683068 rw->EnqueueDependencyChildRegistered (dependencyGroup, child);
30693069 rw->EnqueueDependencyGroupStateUpdate (dependencyGroup);
30703070
@@ -3075,7 +3075,7 @@ void IcingaDB::DependencyGroupChildRegisteredHandler(const Checkable::Ptr& child
30753075 // Checkable as well. The grandparent Checkable may still have wrong numbers of total children, though it's
30763076 // not worth traversing the whole tree way up and sending config updates for each one of them, as the next
30773077 // Redis config dump is going to fix it anyway.
3078- rw->EnqueueConfigObject (parent, ConfigUpdate | FullState);
3078+ rw->EnqueueConfigObject (parent, icingadb::task_queue:: ConfigUpdate | icingadb::task_queue:: FullState);
30793079 }
30803080 }
30813081}
@@ -3090,7 +3090,7 @@ void IcingaDB::DependencyGroupChildRemovedHandler(const DependencyGroup::Ptr& de
30903090void IcingaDB::HostProblemChangedHandler (const Service::Ptr& service) {
30913091 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
30923092 /* Host state changes affect is_handled and severity of services. */
3093- rw->EnqueueConfigObject (service, FullState);
3093+ rw->EnqueueConfigObject (service, icingadb::task_queue:: FullState);
30943094 }
30953095}
30963096
0 commit comments