Commit 7311c602 authored by 张彦钊's avatar 张彦钊

change test file

parent 43300eff
......@@ -62,7 +62,9 @@ def write_redis(device_id,cid_list):
r = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN6@172.16.40.133:6379')
key = str(device_id) + "_dislike"
if r.exists(key):
cids = json.dumps(list(set(eval(r.get(key)).extend(cids))))
value = eval(r.get(key))
value.extend(cids)
cids = json.dumps(list(set(value)))
r.set(key, json.dumps(cids))
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment