| 2776 | } |
| 2777 | |
| 2778 | void IcingaDB::SendCustomVarsChanged(const ConfigObject::Ptr& object, const Dictionary::Ptr& oldValues, const Dictionary::Ptr& newValues) { |
| 2779 | const auto& type = object->GetReflectionType(); |
| 2780 | std::string_view customvarKey = GetRedisCustomVarKey(type); |
| 2781 | if (customvarKey.empty()) { |
| 2782 | return; |
| 2783 | } |
| 2784 | |
| 2785 | if (!m_RconWorker || !m_RconWorker->IsConnected() || oldValues == newValues) { |
| 2786 | return; |
| 2787 | } |
| 2788 | |
| 2789 | Dictionary::Ptr oldVars = SerializeVars(oldValues); |
| 2790 | Dictionary::Ptr newVars = SerializeVars(newValues); |
| 2791 | |
| 2792 | for (const auto& varId : GetDictionaryDeletedKeys(oldVars, newVars)) { |
| 2793 | String id = HashValue(new Array({m_EnvironmentId, varId, object->GetName()})); |
| 2794 | EnqueueRelationsDeletion(id, {{customvarKey, ""}}); |
| 2795 | } |
| 2796 | } |
| 2797 | |
| 2798 | Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable) |
| 2799 | { |
no test coverage detected