[Server] Trigger 'update' when added new rules in MasterClient

This commit is contained in:
Koncord 2017-05-07 02:51:25 +08:00
parent f2b8a939ef
commit 873da495b1

View file

@ -85,6 +85,7 @@ void MasterClient::SetRuleString(std::string key, std::string value)
rule.str = value; rule.str = value;
rule.type = 's'; rule.type = 's';
queryData.rules.insert({key, rule}); queryData.rules.insert({key, rule});
updated = true;
} }
mutexData.unlock(); mutexData.unlock();
} }
@ -99,6 +100,7 @@ void MasterClient::SetRuleValue(std::string key, double value)
rule.val = value; rule.val = value;
rule.type = 'v'; rule.type = 'v';
queryData.rules.insert({key, rule}); queryData.rules.insert({key, rule});
updated = true;
} }
mutexData.unlock(); mutexData.unlock();
} }