MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EnqueueDependencyChildRegistered

Method EnqueueDependencyChildRegistered

lib/icingadb/icingadb-worker.cpp:290–299  ·  view source on GitHub ↗

* Enqueue the registration of a dependency child to a dependency group. * * This function adds a pending item to the queue for processing the registration of a child checkable * to a dependency group. If there is no active Redis connection available, this function is a no-op. * * @param depGroup The dependency group to which the child is being registered. * @param child The child checkable b

Source from the content-addressed store, hash-verified

288 * @param child The child checkable being registered to the dependency group.
289 */
290void IcingaDB::EnqueueDependencyChildRegistered(const DependencyGroup::Ptr& depGroup, const Checkable::Ptr& child)
291{
292 if (GetActive() && m_RconWorker && m_RconWorker->IsConnected()) {
293 {
294 std::lock_guard lock(m_PendingItemsMutex);
295 m_PendingItems.emplace(icingadb::task_queue::PendingDependencyEdgeItem{depGroup, child});
296 }
297 m_PendingItemsCV.notify_one();
298 }
299}
300
301/**
302 * Enqueue the removal of a dependency child from a dependency group.

Calls 2

IsConnectedMethod · 0.80
emplaceMethod · 0.80

Tested by

no test coverage detected