CNSRE / ABTestingGateway

MIT License
2.36k stars 768 forks source link

policy_set和policy_get规则不一致 #111

Closed djfengqiang closed 5 years ago

djfengqiang commented 5 years ago

policy_set规则 # curl 127.0.0.1:8080/ab_admin?action=policy_set -d '{"divtype":"uidrange","divdata":[{"range":{"start":1111,"end":2222},"upstream":"beta1"},{"range":{"start":3333,"end":4444},"upstream":"beta2"}]}' {"code":200,"desc":"success the id of new policy is 24"}

policy_get相同规则 # curl 127.0.0.1:8080/ab_admin?action=policy_get\&policyid=24 {"desc":"success ","code":200,"data":{"divdata":{"0:beta1":"1110.7","3:beta2":"4444.3000000000002","1:beta1":"2222.3000000000002","2:beta2":"3332.6999999999998"},"divtype":"uidrange"}}

通过policy_get得到的规则,看不出当时设置的规则究竟是什么?有没有办法能正确显示规则信息。