@@ -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
@@ -1339,15 +1339,15 @@ void IcingaDB::UpdateState(const Checkable::Ptr& checkable, uint32_t mode)
13391339 String checksum = HashValue (stateAttrs);
13401340
13411341 auto [redisStateKey, redisChecksumKey] = GetCheckableStateKeys (checkable->GetReflectionType ());
1342- if (mode & VolatileState) {
1342+ if (mode & icingadb::task_queue:: VolatileState) {
13431343 String objectKey = GetObjectIdentifier (checkable);
13441344 m_RconWorker->FireAndForgetQueries ({
13451345 {" HSET" , redisStateKey, objectKey, JsonEncode (stateAttrs)},
13461346 {" HSET" , redisChecksumKey, objectKey, JsonEncode (new Dictionary ({{" checksum" , checksum}}))},
13471347 });
13481348 }
13491349
1350- if (mode & RuntimeState) {
1350+ if (mode & icingadb::task_queue:: RuntimeState) {
13511351 ObjectLock olock (stateAttrs);
13521352
13531353 RedisConnection::Query streamadd ({
@@ -1820,7 +1820,7 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
18201820
18211821 auto [configStateKey, checksumStateKey] = GetCheckableStateKeys (checkable->GetReflectionType ());
18221822 EnqueueRelationsDeletion (GetObjectIdentifier (checkable), {{configStateKey, checksumStateKey}});
1823- EnqueueConfigObject (object, ConfigDelete | NextUpdate); // Send also ZREM for next update
1823+ EnqueueConfigObject (object, icingadb::task_queue:: ConfigDelete | icingadb::task_queue:: NextUpdate); // Send also ZREM for next update
18241824
18251825 if (service) {
18261826 SendGroupsChanged<ServiceGroup>(checkable, service->GetGroups (), nullptr );
@@ -1831,7 +1831,7 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
18311831 return ;
18321832 }
18331833
1834- EnqueueConfigObject (object, ConfigDelete);
1834+ EnqueueConfigObject (object, icingadb::task_queue:: ConfigDelete);
18351835
18361836 if (type == TimePeriod::TypeInstance) {
18371837 TimePeriod::Ptr timeperiod = static_pointer_cast<TimePeriod>(object);
@@ -1893,7 +1893,7 @@ void IcingaDB::SendStateChange(const ConfigObject::Ptr& object, const CheckResul
18931893
18941894 tie (host, service) = GetHostService (checkable);
18951895
1896- EnqueueConfigObject (checkable, RuntimeState);
1896+ EnqueueConfigObject (checkable, icingadb::task_queue:: RuntimeState);
18971897
18981898 int hard_state{};
18991899 if (!cr) {
@@ -2074,7 +2074,7 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
20742074 return ;
20752075 }
20762076
2077- EnqueueConfigObject (downtime, ConfigUpdate);
2077+ EnqueueConfigObject (downtime, icingadb::task_queue:: ConfigUpdate);
20782078
20792079 auto checkable (downtime->GetCheckable ());
20802080 auto triggeredBy (Downtime::GetByName (downtime->GetTriggeredBy ()));
@@ -2084,7 +2084,7 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
20842084 tie (host, service) = GetHostService (checkable);
20852085
20862086 /* Update checkable state as in_downtime may have changed. */
2087- EnqueueConfigObject (checkable, FullState);
2087+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
20882088
20892089 RedisConnection::Query xAdd ({
20902090 " XADD" , " icinga:history:stream:downtime" , " *" ,
@@ -2173,7 +2173,7 @@ void IcingaDB::SendRemovedDowntime(const Downtime::Ptr& downtime)
21732173 return ;
21742174
21752175 /* Update checkable state as in_downtime may have changed. */
2176- EnqueueConfigObject (checkable, FullState);
2176+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
21772177
21782178 RedisConnection::Query xAdd ({
21792179 " XADD" , " icinga:history:stream:downtime" , " *" ,
@@ -2262,7 +2262,7 @@ void IcingaDB::SendAddedComment(const Comment::Ptr& comment)
22622262 tie (host, service) = GetHostService (checkable);
22632263
22642264 // Update the checkable state to so that the "last_comment_id" is correctly reflected.
2265- EnqueueConfigObject (checkable, FullState);
2265+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
22662266
22672267 RedisConnection::Query xAdd ({
22682268 " XADD" , " icinga:history:stream:comment" , " *" ,
@@ -2336,7 +2336,7 @@ void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
23362336 tie (host, service) = GetHostService (checkable);
23372337
23382338 // Update the checkable state to so that the "last_comment_id" is correctly reflected.
2339- EnqueueConfigObject (checkable, FullState);
2339+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
23402340
23412341 RedisConnection::Query xAdd ({
23422342 " XADD" , " icinga:history:stream:comment" , " *" ,
@@ -2493,7 +2493,7 @@ void IcingaDB::SendAcknowledgementSet(const Checkable::Ptr& checkable, const Str
24932493 tie (host, service) = GetHostService (checkable);
24942494
24952495 /* Update checkable state as is_acknowledged may have changed. */
2496- EnqueueConfigObject (checkable, FullState);
2496+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
24972497
24982498 RedisConnection::Query xAdd ({
24992499 " XADD" , " icinga:history:stream:acknowledgement" , " *" ,
@@ -2551,7 +2551,7 @@ void IcingaDB::SendAcknowledgementCleared(const Checkable::Ptr& checkable, const
25512551 tie (host, service) = GetHostService (checkable);
25522552
25532553 /* Update checkable state as is_acknowledged may have changed. */
2554- EnqueueConfigObject (checkable, FullState);
2554+ EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
25552555
25562556 RedisConnection::Query xAdd ({
25572557 " XADD" , " icinga:history:stream:acknowledgement" , " *" ,
@@ -2970,7 +2970,7 @@ void IcingaDB::ReachabilityChangeHandler(const std::set<Checkable::Ptr>& childre
29702970{
29712971 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
29722972 for (auto & checkable : children) {
2973- rw->EnqueueConfigObject (checkable, FullState);
2973+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: FullState);
29742974 for (const auto & dependencyGroup : checkable->GetDependencyGroups ()) {
29752975 rw->EnqueueDependencyGroupStateUpdate (dependencyGroup);
29762976 }
@@ -2991,7 +2991,7 @@ void IcingaDB::VersionChangedHandler(const ConfigObject::Ptr& object)
29912991 if (object->IsActive ()) {
29922992 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
29932993 // A runtime config change triggers also a full state update as well as next update event.
2994- rw->EnqueueConfigObject (object, ConfigUpdate | FullState | NextUpdate);
2994+ rw->EnqueueConfigObject (object, icingadb::task_queue:: ConfigUpdate | icingadb::task_queue:: FullState | icingadb::task_queue:: NextUpdate);
29952995 }
29962996 } else if (!object->IsActive () && object->GetExtension (" ConfigObjectDeleted" )) { // same as in apilistener-configsync.cpp
29972997 for (const IcingaDB::Ptr& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
@@ -3055,21 +3055,21 @@ void IcingaDB::FlappingChangeHandler(const Checkable::Ptr& checkable, double cha
30553055void IcingaDB::NewCheckResultHandler (const Checkable::Ptr& checkable)
30563056{
30573057 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3058- rw->EnqueueConfigObject (checkable, VolatileState);
3058+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: VolatileState);
30593059 }
30603060}
30613061
30623062void IcingaDB::NextCheckChangedHandler (const Checkable::Ptr& checkable)
30633063{
30643064 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3065- rw->EnqueueConfigObject (checkable, VolatileState | NextUpdate);
3065+ rw->EnqueueConfigObject (checkable, icingadb::task_queue:: VolatileState | icingadb::task_queue:: NextUpdate);
30663066 }
30673067}
30683068
30693069void IcingaDB::DependencyGroupChildRegisteredHandler (const Checkable::Ptr& child, const DependencyGroup::Ptr& dependencyGroup)
30703070{
30713071 for (const auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
3072- rw->EnqueueConfigObject (child, FullState); // Child requires a full state update.
3072+ rw->EnqueueConfigObject (child, icingadb::task_queue:: FullState); // Child requires a full state update.
30733073 rw->EnqueueDependencyChildRegistered (dependencyGroup, child);
30743074 rw->EnqueueDependencyGroupStateUpdate (dependencyGroup);
30753075
@@ -3080,7 +3080,7 @@ void IcingaDB::DependencyGroupChildRegisteredHandler(const Checkable::Ptr& child
30803080 // Checkable as well. The grandparent Checkable may still have wrong numbers of total children, though it's
30813081 // not worth traversing the whole tree way up and sending config updates for each one of them, as the next
30823082 // Redis config dump is going to fix it anyway.
3083- rw->EnqueueConfigObject (parent, ConfigUpdate | FullState);
3083+ rw->EnqueueConfigObject (parent, icingadb::task_queue:: ConfigUpdate | icingadb::task_queue:: FullState);
30843084 }
30853085 }
30863086}
@@ -3095,7 +3095,7 @@ void IcingaDB::DependencyGroupChildRemovedHandler(const DependencyGroup::Ptr& de
30953095void IcingaDB::HostProblemChangedHandler (const Service::Ptr& service) {
30963096 for (auto & rw : ConfigType::GetObjectsByType<IcingaDB>()) {
30973097 /* Host state changes affect is_handled and severity of services. */
3098- rw->EnqueueConfigObject (service, FullState);
3098+ rw->EnqueueConfigObject (service, icingadb::task_queue:: FullState);
30993099 }
31003100}
31013101
0 commit comments