Commit 4ad15b63 authored by 宋柯's avatar 宋柯

redis清理

parent 14e318e6
...@@ -296,11 +296,11 @@ for search_key in search_keys: ...@@ -296,11 +296,11 @@ for search_key in search_keys:
node_has_del_key_count = 0 node_has_del_key_count = 0
for batch_start_idx in range(0,node_del_key_count, node_del_batch_size): for batch_start_idx in range(0,node_del_key_count, node_del_batch_size):
node_del_key_batch_list = node_del_key_list[batch_start_idx : batch_start_idx + node_del_batch_size] node_del_key_batch_list = node_del_key_list[batch_start_idx : batch_start_idx + node_del_batch_size]
# pipline = conn.pipeline() pipline = conn.pipeline()
for node_del_key in node_del_key_batch_list: for node_del_key in node_del_key_batch_list:
# pipline.delete(node_del_key) pipline.delete(node_del_key)
pass # pass
# pipline.execute() pipline.execute()
node_has_del_key_count += len(node_del_key_batch_list) node_has_del_key_count += len(node_del_key_batch_list)
print("node: {}, node_has_del_key_count: {}, node_del_key_count: {}, node_has_del_key_rate: {}%".format(node, node_has_del_key_count, node_del_key_count, 100 * node_has_del_key_count / node_del_key_count)) print("node: {}, node_has_del_key_count: {}, node_del_key_count: {}, node_has_del_key_rate: {}%".format(node, node_has_del_key_count, node_del_key_count, 100 * node_has_del_key_count / node_del_key_count))
print("node: {}, node_has_del_key_batch_sample_50: {}".format(node, np.random.choice(node_del_key_batch_list, 50, replace= False))) print("node: {}, node_has_del_key_batch_sample_50: {}".format(node, np.random.choice(node_del_key_batch_list, 50, replace= False)))
......
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