| 3031 | } |
| 3032 | |
| 3033 | void IcingaDB::DependencyGroupChildRegisteredHandler(const Checkable::Ptr& child, const DependencyGroup::Ptr& dependencyGroup) |
| 3034 | { |
| 3035 | for (const auto& rw : ConfigType::GetObjectsByType<IcingaDB>()) { |
| 3036 | rw->EnqueueConfigObject(child, icingadb::task_queue::FullState); // Child requires a full state update. |
| 3037 | rw->EnqueueDependencyChildRegistered(dependencyGroup, child); |
| 3038 | rw->EnqueueDependencyGroupStateUpdate(dependencyGroup); |
| 3039 | |
| 3040 | std::set<Checkable::Ptr> parents; |
| 3041 | dependencyGroup->LoadParents(parents); |
| 3042 | for (const auto& parent : parents) { |
| 3043 | // The total_children and affects_children columns might now have different outcome, so update the parent |
| 3044 | // Checkable as well. The grandparent Checkable may still have wrong numbers of total children, though it's |
| 3045 | // not worth traversing the whole tree way up and sending config updates for each one of them, as the next |
| 3046 | // Redis config dump is going to fix it anyway. |
| 3047 | rw->EnqueueConfigObject(parent, icingadb::task_queue::ConfigUpdate | icingadb::task_queue::FullState); |
| 3048 | } |
| 3049 | } |
| 3050 | } |
| 3051 | |
| 3052 | void IcingaDB::DependencyGroupChildRemovedHandler(const DependencyGroup::Ptr& dependencyGroup, const std::vector<Dependency::Ptr>& dependencies, bool removeGroup) |
| 3053 | { |
nothing calls this directly
no test coverage detected