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

Method SendTimePeriodRangesChanged

lib/icingadb/icingadb-objects.cpp:2672–2683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2670}
2671
2672void IcingaDB::SendTimePeriodRangesChanged(const TimePeriod::Ptr& timeperiod, const Dictionary::Ptr& oldValues, const Dictionary::Ptr& newValues) {
2673 if (!m_RconWorker || !m_RconWorker->IsConnected() || oldValues == newValues) {
2674 return;
2675 }
2676
2677 std::vector<String> deletedKeys = GetDictionaryDeletedKeys(oldValues, newValues);
2678
2679 for (const auto& rangeKey : deletedKeys) {
2680 String id = HashValue(new Array({m_EnvironmentId, rangeKey, oldValues->Get(rangeKey), timeperiod->GetName()}));
2681 EnqueueRelationsDeletion(id, {{CONFIG_REDIS_KEY_PREFIX "timeperiod:range", ""}});
2682 }
2683}
2684
2685void IcingaDB::SendTimePeriodIncludesChanged(const TimePeriod::Ptr& timeperiod, const Array::Ptr& oldValues, const Array::Ptr& newValues) {
2686 if (!m_RconWorker || !m_RconWorker->IsConnected() || oldValues == newValues) {

Callers 1

Calls 3

IsConnectedMethod · 0.80
GetMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected