Beispiel #1
0
def delete_rule(typeid):
    p = '%s/%s' % (RULES_PATH, typeid)
    zk = get_zk()
    if zk.exists(p):
        zk.delete(p)
Beispiel #2
0
def set_rule(typeid, content):
    p = '%s/%s' % (RULES_PATH, typeid)
    zk = get_zk()
    zk.ensure_path(p)
    zk.set(p, content)