Commit 889377ea authored by 郭羽's avatar 郭羽

item feature clean

parent 940718ac
import json
import os,sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
import utils.configUtils as configUtils
import utils.connUtils as connUtils
def test():
VERSION = configUtils.SERVICE_VERSION
FEATURE_ITEM_KEY = "Strategy:rec:feature:service:" + VERSION + ":item:"
conn = connUtils.getRedisConn4()
keys = conn.keys(FEATURE_ITEM_KEY)
num = 0
for k in keys:
v = conn.get(k)
if v:
data = json.loads(v,encoding='utf-8')
if "itemid" in data:
# conn.delete(k)
num += 1
print("del {}".format(k))
print("del size:{}".format(str(num)))
if __name__ == '__main__':
test()
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